无法在 python (Anaconda) 中安装 wordcloud
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41409570/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't install wordcloud in python (Anaconda)
提问by user3503711
I am trying to install wordcloud in my python program. I am doing the following steps. Please tell me where i am doing wrong-
我正在尝试在我的 python 程序中安装 wordcloud。我正在执行以下步骤。请告诉我哪里做错了-
I downloaded the wordcloud package from here https://github.com/amueller/word_cloud
Copy and paste it in the Anaconda3 folder.
Open Anaconda command prompt and give the following command "pip install wordcloud".
我从这里下载了 wordcloud 包https://github.com/amueller/word_cloud
将其复制并粘贴到 Anaconda3 文件夹中。
打开 Anaconda 命令提示符并给出以下命令“pip install wordcloud”。
The following error is showing -
显示以下错误 -
Please let me know what to do.
请让我知道该怎么做。
回答by Rajan Kumar
You can simply use conda package manager to install wordcloud, just run:
您可以简单地使用 conda 包管理器来安装 wordcloud,只需运行:
conda install -c https://conda.anaconda.org/conda-forge wordcloud
回答by pavitra
There is a new version available now but this one worked for me
现在有一个新版本可用,但这个版本对我有用
With Anaconda python 3.6
使用 Anaconda python 3.6
- download from this link.
wordcloud 1.3.2?cp36?cp36m?win_amd64.whl
- Then don't extract the file, copy and paste the dir in cmd.
- Use this command
pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
- 从此链接下载。
wordcloud 1.3.2?cp36?cp36m?win_amd64.whl
- 然后不要解压文件,将目录复制粘贴到cmd中。
- 使用这个命令
pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
回答by Brian O'Donnell
It is trying to build Word Cloud using Visual Studio. If you don't have it you can get a subset called "Microsoft Build Tools 2015" here: https://www.microsoft.com/en-us/download/details.aspx?id=48159
它正在尝试使用 Visual Studio 构建 Word Cloud。如果您没有它,您可以在此处获得一个名为“Microsoft Build Tools 2015”的子集:https: //www.microsoft.com/en-us/download/details.aspx?id=48159
Even having a full version of Visual Studio 2015 and my path set up properly I still had trouble installing using pip. I also had no luck with the conda installer. The following worked for me:
即使拥有完整版的 Visual Studio 2015 并且我的路径设置正确,我仍然无法使用 pip 进行安装。我也没有使用 conda 安装程序。以下对我有用:
- Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloudand download the wheel for the version of Word Cloud you need.
- From the command prompt install using pip. For example, pip install wordcloud-1.2.1-cp27-cp27m-win_amd64.whl
- 转到http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud并下载您需要的 Word Cloud 版本的轮子。
- 从命令提示符使用 pip 安装。例如 pip install wordcloud-1.2.1-cp27-cp27m-win_amd64.whl
回答by Shrish Trivedi
Using Anaconda Python 3.6 version For Windows you can do it as:
使用 Anaconda Python 3.6 版本对于 Windows,您可以这样做:
- Installation of wordcloud package
- download wordcloud?1.3.2?cp36?cp36m?win_amd64.whl from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud - Copy the file to your current working directory
- Open command prompt
- python -m pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
- wordcloud包的安装
- 从http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud下载 wordcloud?1.3.2?cp36?cp36m?win_amd64.whl
- 将文件复制到您当前的工作目录
- 打开命令提示符
- python -m pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
回答by shruti salian
I have python 3.6.3 installed on my windows system. I installed wordcloud package in python but faced the "wordcloud No Module Found" error on Anaconda Jupyter Notebook.
我的 Windows 系统上安装了 python 3.6.3。我在 python 中安装了 wordcloud 包,但在 Anaconda Jupyter Notebook 上遇到了“wordcloud No Module Found”错误。
I tried most of the solutions posted here but nothing worked for me.
我尝试了此处发布的大多数解决方案,但没有任何效果。
Finally I installed wordcloud package in the Scripts directory under Anacond3 directoryin the command prompt using:
最后,我在命令提示符下使用以下命令在 Anacond3 目录下的Scripts 目录中安装了 wordcloud 包:
pip install wordcloud
This worked and I am able to import wordcloud on Jupyter now.
这有效,我现在可以在 Jupyter 上导入 wordcloud。
回答by RolandoAmir
I've got the similar error but related to certification, if the error is:
如果错误是:
Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])",),))',),)
由 SSLError(SSLError("bad handshake: Error([(\'SSLroutines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])",),))',),)
This other SO question helped me. It basically said to do:
这个其他SO问题帮助了我。它基本上说要做:
conda config --set ssl_verify false
回答by Katharina Aryani
回答by GaneshKumar C
After a long try:
经过长时间的尝试:
1) Download the latest version of WordCloud from this link.
1) 从此链接下载最新版本的 WordCloud 。
2) Copy it into the Script directory under Anaconda3.
2)复制到Anaconda3下的Script目录下。
3) Open the command prompt and do pip install wordcloud
. (If a win[5]
authorization error occurs, try doing pip
from the admin command prompt or sudo pip install wordcloud
.)
3)打开命令提示符并执行pip install wordcloud
. (如果发生win[5]
授权错误,请尝试pip
从管理员命令提示符或sudo pip install wordcloud
.)
回答by GDB
You should have a virtual environment for each project or group of projects that use a particular set of packages. I use Anaconda. Jupyter should be installed in each of your virtual environments. Let's assume you've already created the environment foo
. Then:
您应该为每个项目或使用一组特定包的项目组创建一个虚拟环境。我使用蟒蛇。Jupyter 应该安装在您的每个虚拟环境中。假设您已经创建了环境foo
。然后:
conda activate foo
conda install jupyter
conda install -c conda-forge wordcloud
conda activate foo
conda install jupyter
conda install -c conda-forge wordcloud
Now when you do the import it should work. My import:
现在,当您进行导入时,它应该可以工作。我的进口:
from wordcloud import WordCloud, STOPWORDS
from wordcloud import WordCloud, STOPWORDS
I'm working through How to Generate a Word Cloud of Any Shape in Python