如果在pip中链接断开,如何在virtualenv中安装库

Pie*_*las 3 python pip virtualenv openerp pychart

所以我想安装需要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))
Run Code Online (Sandbox Code Playgroud)

在日志中我们有:

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))
Run Code Online (Sandbox Code Playgroud)

检查uri时,它返回404未找到.所以我从其他地方下载了pychart(http://download.gna.org/pychart/),我试图安装它(在我的virtualenv中).

pip install PyChart-1.39.tar.gz 
Installing collected packages: PyChart
  Running setup.py install for PyChart
Successfully installed PyChart
Run Code Online (Sandbox Code Playgroud)

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

但是当我尝试重新安装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
Run Code Online (Sandbox Code Playgroud)

难道我做错了什么 ?是安装pychart还是openerp的依赖性存在问题?是否PyChart与pychart的pip不同?

小智 7

您可以尝试,改变了要求更换无效PyChartPython-Chartrequirements.txt:

Python的走势== 1.39

这个对我有用.