简体   繁体   English

需要帮助安装wordcloud

[英]Need help installing wordcloud

Edited this post: I was incorrect about my commands in terminal, they work in powershell and thank you for the advice on the Windows subsytem for Linux. 编辑了这篇文章:我对终端中的命令不正确,它们在Powershell中运行,并感谢您对Linux的Windows子系统的建议。

QUESTION: I am having trouble installing wordcloud and I'm not really understanding the errors I'm seeing (listed below). 问题:我在安装wordcloud时遇到问题,但我不太了解所看到的错误(在下面列出)。 Link to wordcloud github page . 链接到wordcloud github页面 I tried to pip install, conda install, and downloading the manual install using wget https://github.com/amueller/word_cloud/archive/master.zip (the unzip command wasn't recognized in powershell). 我尝试使用wget https://github.com/amueller/word_cloud/archive/master.zip (在Powershell中无法识别unzip命令)进行点子安装,conda安装和下载手动安装。 Help? 救命?

C:\Users\ghodg>pip install wordcloud
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\pip-script.py", line 3, in <module>
    import pip
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3018, in <module>
    @_call_aside
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2092, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2121, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

The windows terminal does not have any of these commands. Windows终端没有任何这些命令。 Those are Bash commands(command language). 这些是Bash命令(命令语言)。 There is Git Bash which you can download from here: https://git-for-windows.github.io/ It has some commands missing, although it could help. 您可以从此处下载Git Bash: https : //git-for-windows.github.io/虽然可以提供帮助,但缺少一些命令。 And this too: https://msdn.microsoft.com/en-us/commandline/wsl/about should be installed 也是这样: https : //msdn.microsoft.com/en-us/commandline/wsl/about应该被安装

EDIT: It may be the version of pip . 编辑:这可能是pip的版本。 Try pip3 install wordcloud If you have an error, you may try sudo apt install python3-pip or (if you are a Windows user) py -m pip3 install wordcloud or py3 -m pip install wordcloud . 尝试pip3 install wordcloud如果出现错误,可以尝试sudo apt install python3-pip (if you are a Windows user) py -m pip3 install wordcloud py3 -m pip install wordcloud I am not sure which one will work, because I am a Linux user, although I had Windows before. 我不确定哪个会工作,因为我是Linux用户,尽管我以前有Windows。

Seems to be an issue with setuptools . 似乎是setuptools问题 You might need to upgrade setuptools and pip first with pip install -U setuptools pip . 您可能需要先使用pip install -U setuptools pip升级setuptools和pip install -U setuptools pip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM