当前位置:网站首页>Pyldavis installation and use | attributeerror: module 'pyldavis' has no attribute' gensim '| visual results are exported as separate web pages
Pyldavis installation and use | attributeerror: module 'pyldavis' has no attribute' gensim '| visual results are exported as separate web pages
2022-07-02 01:27:00 【Ye Tingyun】
pip install Put on the pyLDAvis
pip install pyLDAvis -i http://pypi.douban.com/simple --trusted-host
(base) C:\Users\Administrator>pip install pyLDAvis -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting pyLDAvis
Downloading http://pypi.doubanio.com/packages/03/a5/15a0da6b0150b8b68610cc78af80364a80a9a4c8b6dd5ee549b8989d4b60/pyLDAvis-3.3.1.tar.gz (1.7 MB)
|████████████████████████████████| 1.7 MB 6.8 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: pandas>=1.2.0 in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (1.3.4)
Requirement already satisfied: future in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (0.18.2)
Requirement already satisfied: numpy>=1.20.0 in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (1.20.3)
Requirement already satisfied: scipy in c:\users\administrator\appdata\roaming\python\python38\site-packages (from pyLDAvis) (1.6.0)
Requirement already satisfied: joblib in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (1.0.1)
Requirement already satisfied: gensim in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (3.8.3)
Requirement already satisfied: scikit-learn in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (0.23.1)
Requirement already satisfied: jinja2 in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (2.7.2)
Requirement already satisfied: setuptools in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (49.2.0.post20200714)
Collecting sklearn
Downloading http://pypi.doubanio.com/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz (1.1 kB)
Requirement already satisfied: numexpr in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (2.7.1)
Requirement already satisfied: funcy in d:\python\anaconda3\lib\site-packages (from pyLDAvis) (1.17)
Requirement already satisfied: pytz>=2017.3 in d:\python\anaconda3\lib\site-packages (from pandas>=1.2.0->pyLDAvis) (2020.1)
Requirement already satisfied: python-dateutil>=2.7.3 in d:\python\anaconda3\lib\site-packages (from pandas>=1.2.0->pyLDAvis) (2.8.1)
Requirement already satisfied: six>=1.5.0 in d:\python\anaconda3\lib\site-packages (from gensim->pyLDAvis) (1.15.0)
Requirement already satisfied: smart-open>=1.8.1 in d:\python\anaconda3\lib\site-packages (from gensim->pyLDAvis) (4.1.2)
Requirement already satisfied: Cython==0.29.14 in d:\python\anaconda3\lib\site-packages (from gensim->pyLDAvis) (0.29.14)
Requirement already satisfied: threadpoolctl>=2.0.0 in d:\python\anaconda3\lib\site-packages (from scikit-learn->pyLDAvis) (2.1.0)
Requirement already satisfied: markupsafe in d:\python\anaconda3\lib\site-packages (from jinja2->pyLDAvis) (2.0.1)
Building wheels for collected packages: pyLDAvis, sklearn
Building wheel for pyLDAvis (PEP 517) ... done
Created wheel for pyLDAvis: filename=pyLDAvis-3.3.1-py2.py3-none-any.whl size=136900 sha256=e23c194c0ef03967d487011208dede4141f5f6a163a77111283455f230c697fa
Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\b5\ee\b2\29f82d7103ba90942d31cdeb29372b27fb74dbe7ff535cc081
Building wheel for sklearn (setup.py) ... done
Created wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl size=1320 sha256=9a20c412366931bdd7ca5bad4a82cdac502d9414a32a5320641b1898e633cd6e
Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\c5\c2\a1\e36638731a4ac05326b1bf08abc0d79c19ba07700cf6b5d648
Successfully built pyLDAvis sklearn
Installing collected packages: sklearn, pyLDAvis
Successfully installed pyLDAvis-3.3.1 sklearn-0.0
I thought I could use it happily , However, an error is reported in the running code :


uninstall Just installed pyLDAvis==3.3.1
Install the specified version pyLDAvis==2.1.2.
pip install pyLDAvis==2.1.2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Or do not install the old version , Use the new version :
import pyLDAvis.gensim_models as gensimvis
from pyLDAvis import gensim
pyLDAvis.enable_notebook()
''' lda: Calculated topic model corpus: Document word frequency matrix dictionary: Word space '''
d = gensim.prepare(lda,corpus,dictionary)
d = gensimvis.prepare(lda,corpus,dictionary)
pyLDAvis.display(d) # Displayed in browser
# pyLDAvis.save_html(p, 'lda.html')
utilize pyLDAvis.save_html(p, ‘lda.html’) Method can save the visualization results as separate HTML file .
Refer to the :
- About python Package installation error solution ( With gensim、pyLDAvis For example )
- https://blog.csdn.net/qq_42841672/article/details/115703611
- take pyLDAvis The visualization results are exported as independent web pages
边栏推荐
- 迁移云计算工作负载的四个基本策略
- Global and Chinese market of avionics systems 2022-2028: Research Report on technology, participants, trends, market size and share
- 学习笔记24--多传感器后融合技术
- Infiltration records of CFS shooting range in the fourth phase of the western regions' Dadu Mansion
- 首场“移动云杯”空宣会,期待与开发者一起共创算网新世界!
- Global and Chinese market of picture archiving and communication system (PACS) 2022-2028: Research Report on technology, participants, trends, market size and share
- Ubuntu20.04 PostgreSQL 14 installation configuration record
- Datawhale 社区黑板报(第1期)
- About asp Net core uses a small detail of datetime date type parameter
- 企业应该选择无服务器计算吗?
猜你喜欢
![[image enhancement] vascular image enhancement based on frangi filter with matlab code](/img/b3/b4164fb7db8645f470180e352b5717.png)
[image enhancement] vascular image enhancement based on frangi filter with matlab code

Learning note 24 - multi sensor post fusion technology

Day 13 of hcip (relevant contents of BGP agreement)

6-3漏洞利用-SSH环境搭建
![[rust web rokcet Series 2] connect the database and add, delete, modify and check curd](/img/23/cfa13ad30e45ef7cdda690775964a7.jpg)
[rust web rokcet Series 2] connect the database and add, delete, modify and check curd

Have you stepped on the nine common pits in the e-commerce system?

The pain of Xiao Sha

关于ASP.NET CORE使用DateTime日期类型参数的一个小细节

Memorabilia of domestic database in June 2022

Introduction to ffmpeg Lib
随机推荐
Circular statements in shell programming
Architecture evolution from MVC to DDD
No converter found for return value of type: class
The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!
[IVX junior engineer training course 10 papers] 06 database and services
什么是商业养老保险?商业养老保险安全靠谱吗?
II Basic structure of radio energy transmission system
I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
Docker installing Oracle_ 11g
Basic usage of three JS high-order functions --filter---map---reduce
[rust web rokcet Series 2] connect the database and add, delete, modify and check curd
机器学习基本概念
10 minutes to get started quickly composition API (setup syntax sugar writing method)
Learn C language from scratch day 025 (maze)
Modeling essays series 124 a simple coding method
[image enhancement] vascular image enhancement based on frangi filter with matlab code
Design and implementation of radio energy transmission system
电商系统中常见的9大坑,你踩过没?
Bubble Sort Graph
遊戲思考15:全區全服和分區分服的思考