我试图使用pip安装gensim但我得到:
"Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 377, in setup_py
import setuptools # noqa
File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 11, in <module>
from setuptools.extern.six.moves import filterfalse, map
File "/Library/Python/2.7/site-packages/setuptools/extern/__init__.py", line 1, in <module>
from pkg_resources.extern import VendorImporter
ImportError: No module named extern"
Run Code Online (Sandbox Code Playgroud)
其他帖子建议运行
pip install -U setuptools
Run Code Online (Sandbox Code Playgroud)
报告已成功安装包.
Installing collected packages: setuptools
Successfully installed setuptools-21.0.0
Run Code Online (Sandbox Code Playgroud)
但是,运行gensim pip install命令:
pip install gensim
Run Code Online (Sandbox Code Playgroud)
再次给出第一个错误.
任何想法为什么会这样?