gpt4 book ai didi

python - 导入错误:没有名为 py31compat 的模块

转载 作者:太空宇宙 更新时间:2023-11-03 14:35:14 25 4
gpt4 key购买 nike

我正在尝试使用

安装 gensim
sudo -H pip install --upgrade gensim

但它给了我这个错误:

  File "setup.py", line 301, in <module>
include_package_data=True,
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/dist-packages/setuptools/command /install.py", line 67, in run
self.do_egg_install()
File "/usr/local/lib/python2.7/dist-packages/setuptools/command /install.py", line 98, in do_egg_install
easy_install = self.distribution.get_command_class('easy_install')
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 576, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 47, in <module>
from setuptools.sandbox import run_setup
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 15, in <module>
import pkg_resources.py31compat
ImportError: No module named py31compat

请帮助我安装 gensim。我用谷歌搜索了它,但找不到解决方案。

最佳答案

看起来 setuptoopls 丢失了。尝试一下

$sudo pip install setuptools

关于python - 导入错误:没有名为 py31compat 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46998858/

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