命令“python setup.py egg_info”在 /private/tmp/pip-install-xkffs1ax/word2vec/ 中失败,错误代码为 1

命令“python setup.py egg_info”在 /private/tmp/pip-install-xkffs1ax/word2vec/ 中失败,错误代码为 1

我正在尝试安装 word2vec,但运行时不断出现此错误pip install word2vec

    Collecting word2vec
  Using cached https://files.pythonhosted.org/packages/98/9c/0cc6019be231950235517c29d2d6a2fca76dfa75ad4162ccce22fb1b4364/word2vec-0.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/zj/z4d6pnbj461cs58zwdrqmbc00000gn/T/pip-install-wSs7Uz/word2vec/setup.py", line 23, in <module>
        from Cython.Build import cythonize
    ImportError: No module named Cython.Build

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zj/z4d6pnbj461cs58zwdrqmbc00000gn/T/pip-install-wSs7Uz/word2vec/

Python 和 pip 版本:

pip version: 19.0.1

python version: 3.6.5

答案1

事实证明我的 Python 安装出现了一些错误。

运行brew reinstall python然后运行pip3 install word2vec似乎已经解决了这个问题。

相关内容