$ pip install rqalpha -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting rqalpha
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/4e/e856b7a92370978189e7083aee4e14b388950b24e2bdcff30ab95c4670df/rqalpha-3.0.9.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-pef3ej64/rqalpha/setup.py", line 20, in <module>
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-pef3ej64/rqalpha/
$ wget https://pypi.tuna.tsinghua.edu.cn/packages/61/4e/e856b7a92370978189e7083aee4e14b388950b24e2bdcff30ab95c4670df/rqalpha-3.0.9.tar.gz
$ tar zxvf rqalpha-3.0.9.tar.gz
$ cd rqalpha-3.0.9/
$ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
$ pip install rqalpha -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting rqalpha
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/4e/e856b7a92370978189e7083aee4e14b388950b24e2bdcff30ab95c4670df/rqalpha-3.0.9.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-4gxb3yp2/rqalpha/setup.py", line 20, in <module>
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4gxb3yp2/rqalpha/
还出同样错误。
找到https://stackoverflow.com/questions/49837301/pip-10-no-module-named-pip-req?noredirect=1
Installation
For installation using get-pip.py use the --force-reinstall flag:
$ python get-pip.py --force-reinstall
Obviously this is till they fix the problem https://github.com/pypa/pip/issues/5220
Recommended Alternative to pip's internal commands
Avoid putting any dependency links in your requirements.txt file. Instead use the method mentioned below. You can directly put the dependency links in you setup.py file. Some famous packages also maintain the requirements inside the setup.py file in the form of a list and don't have any requirements.txt file
with open('requirements.txt') as f:
install_requires = f.read().strip().split('n')
setup(
name='app_name',
.
.
install_requires=install_requires,
dependency_links=[
'https://github.com/frappe/python-pdfkit.git#egg=pdfkit'
],
cmdclass =
{
'clean': CleanCommand
}
)
Imports from pip (BAD PRACTICE - DO NOT USE as it may break anytime! )
It is highly recommended that you avoid this because, as mentioned in the pip user guide, these methods are not thread safe. Also since they're pip's private methods, they may change it anytime without any prior notice, thereby breaking your package installation!
If you have any imports from pip, such as:
from pip.req import parse_requirements
it'll break. Since these have been now moved to pip._internal as such:
from pip._internal.req import parse_requirements
However effectively you'll have to use something like this for backward compatibility:
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
Important
Now that said it's not a good practice to use the internal pip functions, due to multiple reasons as mentioned here: https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program
修改setup.py
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
然后手动安装.
$ python setup.py install
相关知识
rqalpha安装遇到的问题
宠物牵引绳检测的arm边缘设备安装遇到的问题
R软件安装详细教程
pkpm怎么安装专业交流论坛
你遇到或将会遇到的鱼缸潜水泵故障及处理方法!
【壁挂炉安装方法】壁挂炉安装示意图 壁挂炉如何安装?
养猫经常遇到的问题
怎样安装并激活MindManager2018思维导图?
鱼缸加热棒的安装方法(鱼缸加热棒的安装方法图片)
猫爬架安装平台推荐:鲁班到家帮你轻松搞定
网址: rqalpha安装遇到的问题 https://m.mcbbbk.com/newsview712370.html
上一篇: 梦幻西游闲来无事合一组谛听 7+ |
下一篇: 《梦幻西游三维版》手游召唤兽图鉴 |