gpt4 book ai didi

python - 安装 Gensim 时出错 : "Could not import setuptools which is required to install from a source distribution."

转载 作者:太空狗 更新时间:2023-10-30 00:54:34 25 4
gpt4 key购买 nike

我正在尝试使用 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"

其他帖子建议运行

 pip install -U setuptools

哪些报告已成功安装包。

Installing collected packages: setuptools
Successfully installed setuptools-21.0.0

但是,运行 gensim pip install 命令:

pip install gensim

只是再次给出第一个错误。

知道为什么会发生这种情况吗?

最佳答案

我在安装 SciPy Stack 时遇到了非常相似的问题。

尝试使用:pip install --user setuptools

而不是使用:pip install -U setuptools

关于python - 安装 Gensim 时出错 : "Could not import setuptools which is required to install from a source distribution.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37089933/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com