gpt4 book ai didi

python - 当 pip 中的链接断开时如何在 virtualenv 中安装库

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

所以我想安装需要 pychart 的 openerp 7.0.406,它的唯一链接似乎在 pip 中损坏了。

No distributions at all found for pychart in ./env/lib/python2.7/site-packages (from openerp-core==7.0.406->-r picdyn_openerp_conf/requirements (line 11))

在日志中我们有:

URLs to search for versions for pychart in ./env/lib/python2.7/site-packages (from openerp-core==7.0.406->-r picdyn_openerp_conf/requirements (line 15)):
* https://pypi.python.org/simple/pychart/
Analyzing links from page https://pypi.python.org/simple/pychart/
Skipping link http://www.hpl.hp.com/personal/Yasushi_Saito/pychart (from https://pypi.python.org/simple/pychart/); not a file
Not searching http://www.hpl.hp.com/personal/Yasushi_Saito/pychart (from https://pypi.python.org/simple/pychart/) for files because external urls are disallowed.
Could not find any downloads that satisfy the requirement pychart in ./env/lib/python2.7/site-packages (from openerp-core==7.0.406->-r picdyn_openerp_conf/requirements (line 15))

当您检查 uri 时,它会返回 404 not found。所以我从其他地方(http://download.gna.org/pychart/)下载了 pychart,并尝试安装它(在我的 virtualenv 中)。

pip install PyChart-1.39.tar.gz 
Installing collected packages: PyChart
Running setup.py install for PyChart
Successfully installed PyChart

它似乎并没有真正起作用,因为当我再次尝试从我的需求文件更新时,pip 仍然尝试访问“http://www.hpl.hp.com/personal/Yasushi_Saito/pychart”并显示相同的错误消息并且 openerp 无法安装。

但是当我尝试重新安装 pychart 时,它说 pychart 实际上已安装:

pip install PyChart-1.39
Requirement already satisfied (use --upgrade to upgrade): PyChart==1.39 from file:///home/pierre/PyChart-1.39 in ./env/lib/python2.7/site-packages

我做错了什么吗?是否安装了 pychart 或者 openerp 的依赖性有问题? PyChart 与 pip 的 pychart 有区别吗?

最佳答案

您可以尝试更改要求,将 requirements.txt 中的无效 PyChart 替换为 Python-Chart:

Python-Chart==1.39

它对我有用。

关于python - 当 pip 中的链接断开时如何在 virtualenv 中安装库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26355685/

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