Pipenv игнорировать Python версия - PullRequest
1 голос
/ 04 февраля 2020

Я пытаюсь использовать Pipenv на macOS (10.15.3), но у меня возникают проблемы. В частности, я заявляю, что он использует Python 3.6, но я не могу заблокировать Pipfile. Точно такой же код отлично работает в системе Linux.

pipenv --python 3.6 update

Вот мой Pipfile:

[[source]]
name = "pypi"
url = "https://pypi.org/simple/"
#url = "https://nexus.agilesof.com:8443/repository/pypi-all/simple/"
verify_ssl = true

[dev-packages]

[packages]
aniso8601 = "==7.0.0"
Click = "==7.0"
Flask = "==1.1.1"
Flask-GraphQL = "==2.0.1"
graphene = "==2.1.8"
graphene-sqlalchemy = "==2.2.2"
graphql-core = "==3.0.3"
graphql-relay = "==2.0.1"
graphql-server-core = "==1.2.0"
iso8601 = "==0.1.14"
itsdangerous = "==1.1.0"
Jinja2 = "==2.11.0"
MarkupSafe = "==1.1.1"
promise = "==2.3"
Rx = "==1.6.1"
singledispatch = "==3.4.0.3"
six = "==1.14.0"
SQLAlchemy = "==1.3.13"
Werkzeug = "==0.16.0"

[requires]
python_version = "3.6"

Ошибка, которую я получаю, заключается в том, что она не может разрешить некоторые зависимости (которые, как я знаю, существуют), но, похоже, он использует Python 3,8, хотя я указал 3,6

полное сообщение об ошибке

Creating a virtualenv for this project…
Pipfile: /Users/mitchellmurphy/Developer/SpatheSystems/flask_graphene/Pipfile
Using /Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3 (3.7.2) to create virtualenv…
⠸ Creating virtual environment...Already using interpreter /Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3
Using base prefix '/Users/mitchellmurphy/.pyenv/versions/3.7.2'
New python executable in /Users/mitchellmurphy/.local/share/virtualenvs/flask_graphene-oJq_175y-/Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3/bin/python3
Also creating executable in /Users/mitchellmurphy/.local/share/virtualenvs/flask_graphene-oJq_175y-/Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3

✔ Successfully created virtual environment!
Virtualenv location: /Users/mitchellmurphy/.local/share/virtualenvs/flask_graphene-oJq_175y-/Users/mitchellmurphy/.pyenv/versions/3.7.2/bin/python3
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.2 (/Users/m/.local/share/v/f/Users/m/.pyenv/v/3.7.2/bin/p/bin/python).
  $ pipenv --rm and rebuilding the virtual environment may resolve the issue.
  $ pipenv check will surely fail.
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed!
CRITICAL:pipenv.patched.notpip._internal.index:Could not find a version that satisfies the requirement iso8601==0.1.14 (from versions: 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12)
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/resolver.py", line 85, in _main
[pipenv.exceptions.ResolutionFailure]:       requirements_dir=requirements_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: No matching distribution found for iso8601==0.1.14
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/resolver.py", line 85, in _main
[pipenv.exceptions.ResolutionFailure]:       requirements_dir=requirements_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: No matching distribution found for iso8601==0.1.14
...