#python-2.7 #pipenv #pep8 #pipfile
#python-2.7 #pipenv #pep8 #pipfile
Вопрос:
Я пытаюсь заблокировать Pip-файл и сталкиваюсь с приведенной ниже ошибкой:
$pipenv install
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Building requirements...
Resolving dependencies...
✘ Locking Failed!
[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: Could not find a version that matches pep8 (from -r
/var/folders/k_/z7wqjx090x7ccf11mkbpbnw80000gn/T/pipenv7upqst3zrequirements/pipenv-DczZI5-
constraints.txt (line 2))
No versions found
Was https://pypi.org/simple reachable?
Пробовал запускать предложенные команды, но все то же самое.
pipenv lock --clear
Locking [dev-packages] dependencies…
Building requirements...
Resolving dependencies...
✘ Locking Failed!
[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: Could not find a version that matches pep8 (from -r
/var/folders/k_/z7wqjx090x7ccf11mkbpbnw80000gn/T/pipenv0s9lv_igrequirements/pipenv-G4Zdsv-
constraints.txt (line 2))
No versions found
Was https://pypi.org/simple reachable?
Комментарии:
1. однако установка pipenv с пропуском блокировки работает. Но тогда как мне сгенерировать Pipfile.lock?
Ответ №1:
Неважно, разобрался с этим с помощью pipenv —support. Оказалось, что pipenv использовал python3. Поэтому пришлось явно указать на python2, используя команду ниже, и это создало Pipfile.lock
pipenv --two install