我正在使用pip在虚拟环境中安装一些软件包,但显示以下错误:
pip install Flask-Ask==0.9.8
,输出为:
Collecting Flask-Ask==0.9.8
Using cached https://files.pythonhosted.org/packages/6a/f5/d4709ae94584a0b1541e9b52b2d25a8a1bdb6e2da9d6870f23fdd0523a30/Flask-Ask-0.9.8.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/nisha/v2env/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wf2c65i_/Flask-Ask/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wf2c65i_/Flask-Ask/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-wf2c65i_/Flask-Ask/pip-egg-info
cwd: /tmp/pip-install-wf2c65i_/Flask-Ask/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wf2c65i_/Flask-Ask/setup.py", line 8, in <module>
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
答案 0 :(得分:1)
我认为这是一个过时的模块。因此pip必须使用较早的版本。因此,根据我的收集,任何版本超过10 pip的内容都找不到烧瓶-问(我认为是req.txt文件)
尝试:
python -m pip install pip==9.0.1
注意: 完成此模块后,您将不得不再次更新点子。
模块完成后:
python -m pip install --upgrade pip