所以我正在考虑安装Gensim for Python。首先,我发现自己被一个过时的setuptools版本所阻挡。
经过半小时的谷歌搜索后,我以某种方式安装了较新版本的setuptools。
之后我能够成功安装Gensim,但是当我进入Python尝试导入它时,它说no module named Queue
。没问题,所以我尝试安装Queue,但是我收到了错误:
ImportError: No module named extern
好的没问题,我尝试安装extern
,但我收到同样的错误。
经过大约一个半小时的谷歌搜索后,我无法弄清楚该怎么做,在某些时候我偶然删除了pip
。当我尝试重新安装它时,我仍然得到ImportError
。我该怎么办?
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 9, in <module>
load_entry_point('setuptools==27.2.0', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "build/bdist.macosx-10.11-intel/egg/setuptools/__init__.py", line 10, in <module>
File "build/bdist.macosx-10.11-intel/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern
答案 0 :(得分:0)
在Ubuntu 16.04上遇到同样的问题,并解决了这个问题:
sudo apt-get install --reinstall python-setuptools
尝试使用模拟OSX命令。