简体   繁体   中英

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.

QUESTION: I am having trouble installing wordcloud and I'm not really understanding the errors I'm seeing (listed below). Link to wordcloud github page . 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). 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. Those are Bash commands(command language). 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. And this too: https://msdn.microsoft.com/en-us/commandline/wsl/about should be installed

EDIT: It may be the version of 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 . I am not sure which one will work, because I am a Linux user, although I had Windows before.

Seems to be an issue with setuptools . You might need to upgrade setuptools and pip first with pip install -U setuptools pip .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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