【发布时间】:2019-11-24 08:27:24
【问题描述】:
我有一个正在转换为 pipenv 的项目。当我第一次运行pipenv install 时,它开始正常,但多个依赖项失败。当我运行pip install -r requirements.txt 时,我没有问题。我正试图找出我可能做错了什么。
生成的 pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[requires]
python_version = "2.7"
[dev-packages]
[packages]
boto = "*"
boto3 = "*"
cssmin = "*"
dropbox = "*"
gunicorn = "*"
ipdb = "*"
libsass = "*"
marshmallow = "*"
mock = "*"
networkx = "*"
newrelic = "*"
oauth2client = "*"
pandas = "*"
psycopg2 = "*"
pygsheets = "*"
pytest = "*"
pytest-cov = "*"
pytest-pep8 = "*"
python-dotenv = "*"
redis = "*"
requests = "*"
six = "==1.10.0"
scipy = "*"
seaborn = "*"
matplotlib = "*"
python-memcached = "*"
slackclient = "*"
snowflake-sqlalchemy = "*"
sqlalchemy-redshift = "*"
sqlparse = "*"
unicodecsv = "*"
urllib3 = "==1.23"
typing = "*"
Authlib = "*"
Flask-Assets = "*"
Flask-Breadcrumbs = "*"
Flask-Cache = "*"
Flask = "*"
Flask-Session = "*"
Flask-WTF = "*"
SQLAlchemy = "*"
GitPython = "*"
XlsxWriter = "*"
我得到了错误
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
[pipenv.exceptions.InstallError]: editable_packages=state.installstate.editables,
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 862, in do_install_dependencies
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, False, failed_deps_queue, retry=False)
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1))']
[pipenv.exceptions.InstallError]: ["DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.", ' ERROR: Could not find a version that satisfies the requirement aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.4, 0.21.5, 0.21.6, 0.22.0a0, 0.22.0b0, 0.22.0b1, 0.22.0b2, 0.22.0b3, 0.22.0b4, 0.22.0b5, 0.22.0b6, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6.post1, 2.0.7, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.3.0a4, 2.3.0, 2.3.1, 2.3.2b2)', 'ERROR: No matching distribution found for aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1))']
但许多其他软件包也失败了。该错误显示它使用 Python 3.7,这是我的全局版本,但我在 Python 2.7.16 shell 中运行了上述所有命令,由 pipenv 本身启动(使用pipenv shell)。即使没有 shell,因为我在 pipfile 中明确列出了 Python 版本,我希望 pipenv 安装与版本匹配的包,尽管这可能是一个错误的假设?
【问题讨论】: