Can't install spaCy on WinPython: “ ModuleNotFoundError: No module named 'semver'”

梦想与她 提交于 2019-12-24 03:01:47

问题


I'm trying to use a portable Python interpreter therefore I installed WinPython and plan to deploy my application to other machines someday.

For my application I need to use a NLP module "spaCy". I tried to install spaCy on WinPython (pip install -U spacy), but it can not be installed. When it installs the module dependencies, a module "semver" seems can not be installed:

Collecting semver (from sputnik<0.10.0,>=0.9.2->spacy)   Using cached semver-2.7.6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Tyler\AppData\Local\Temp\pip-build-m1sjlou_\semver\setup.py", line 2, in <module>
        import semver as package
    ModuleNotFoundError: No module named 'semver'

    ----------------------------------------  
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Tyler\AppData\Local\Temp\pip-build-m1sjlou_\semver\

I tried to install semver directly, it showed the same error. I downloaded the "semver-2.7.6.tar.gz" file and use WinPython Control Panel to install it. It can not be installed.

What should I do?


回答1:


IF your on Winpython-3.6, try this:

  • find the "python._pth" file next to the 'python.exe" file of winpython,

  • rename it as "zpython._pth"

IT looks related to https://bugs.python.org/issue29723



来源:https://stackoverflow.com/questions/42664276/cant-install-spacy-on-winpython-modulenotfounderror-no-module-named-semver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!