gpt4 book ai didi

python - 无法安装python包gensim ubuntu

转载 作者:行者123 更新时间:2023-11-28 19:13:45 25 4
gpt4 key购买 nike

我无法通过

安装任何 python 包
pip install <name>

它总是抛出错误

Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-V2srLa/Gensim
Storing debug log for failure in /home/<username>/.pip/pip.log

对于使用 sudo apt-get install python-<name> 的其他包曾经工作但不适用于 gensim

我已尝试安装/解压缩包并转到 python setup.py test
python setup.py install
它抛出 pkg_resources.DistributionNotFound: The 'ruamel.yaml>=0.10.7' distribution was not found and is required by the application

我已经尝试安装 'ruamel.yaml>=0.10.7' 但它仍然不起作用

对失败的原因有何帮助?我该如何解决?

更新:移动到 root (sudo su) 对我有用

最佳答案

如果您偶然发现了这个问题,最好的答案是使用虚拟环境安装 gensim 和其他软件包,而不是使用 sudo 或 root。参见 Is it acceptable and safe to run pip install under sudo? ,以及 https://towardsdatascience.com/all-you-need-to-know-about-python-virtual-environments-9b4aae690f9 , 和 https://realpython.com/python-virtual-environments-a-primer/

关于python - 无法安装python包gensim ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36256584/

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