Это вызвало у меня проблемы при разработке с django, самый простой случай воспроизвести эту ошибку следующим образом.
Я использую Anaconda 4.6.4 под управлением Python 3.6.5, pip версии 19.0.3 и pipenv версии 2018.11.26.Я обновил все пакеты, даже пытался использовать предыдущие версии нескольких пакетов.
Когда я использую:
pipenv shell
, я получаю новую виртуальную среду, затем пытаюсь:
pipenv install django
Затем я получаю следующее сообщение об ошибке:
Installing django…
Adding django to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Success!
Updated Pipfile.lock (85c883)!
Installing dependencies from Pipfile.lock (85c883)…
An error occurred while installing pytz==2018.9 --hash= ! Will try again.
================================ 2/2 - 00:00:01
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]: skip_lock=skip_lock,
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\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]: []
[pipenv.exceptions.InstallError]: ['Usage: pip [options]', '', 'Invalid requirement: pytz==2018.9 --hash=\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'pip: error: Arguments to --hash must be a hash name followed by a value, like --hash=sha256:abcde...']
ERROR: ERROR: Package installation failed...
================================ 0/1 - 00:00:00
Это происходит, когда я использую командную строку, Power Shell, Pycharm, редактор атомов.Я искал похожие ошибки онлайн повсеместно, но не могу найти ничего подходящего для этого.Я попытался просмотреть исходный код pipenv для функций batch_install и _clean_procs среди других в трассировке стека, но не смог понять, почему он не работает.