Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv install fails due to packages not matching hashes from requirements file #5466

Closed
rolandjitsu opened this issue Nov 10, 2022 · 10 comments
Labels
OS: Raspberry Pi Issue affects one of the OS of the Raspberry Pi platform triage Type: Documentation 📖 This issue relates to documentation of pipenv. Type: Question ❔ This is a question or a request for support.

Comments

@rolandjitsu
Copy link

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.

Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.

Make sure to mention your debugging experience if the documented solution failed.

Issue description

Running pipenv install on a Raspberry Pi results in the following error:

Installing dependencies from Pipfile.lock (330cd4)...
Installing dependencies from Pipfile.lock (330cd4)...
An error occurred while installing certifi==2022.9.24 ; python_version >= '3.6' --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382! Will try again.
An error occurred while installing charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' --hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845! Will try again.
An error occurred while installing idna==3.4 ; python_version >= '3.5' --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2! Will try again.
An error occurred while installing requests==2.28.1 ; python_version >= '3.7' and python_version < '4' --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349! Will try again.
An error occurred while installing robotframework==6.0.1 --hash=sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea --hash=sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb! Will try again.
An error occurred while installing robotframework-requests==0.9.4 --hash=sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2 --hash=sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82! Will try again.
An error occurred while installing urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997! Will try again.
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
[pipenv.exceptions.InstallError]: Collecting certifi==2022.9.24
[pipenv.exceptions.InstallError]:   Using cached https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl (161 kB)
[pipenv.exceptions.InstallError]: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
[pipenv.exceptions.InstallError]:     certifi==2022.9.24 from https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl#sha256=70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b (from -r /tmp/pipenv-a304ihl7-requirements/pipenv-g1zcyh5f-hashed-reqs.txt (line 1)):
[pipenv.exceptions.InstallError]:         Expected sha256 0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14
[pipenv.exceptions.InstallError]:         Expected     or 90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
[pipenv.exceptions.InstallError]:              Got        70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b
ERROR: Couldn't install package: [Requirement(_name='certifi', vcs=None, req=NamedRequirement(name='certifi', version='==2022.9.24', req=Requirement.parse('certifi==2022.9.24; python_version >= "3.6"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=certifi, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===2022.9.24, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=certifi==2022.9.24)>), markers='python_version >= "3.6"', _specifiers='==2022.9.24', index=None, editable=False, hashes=frozenset({'sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14', 'sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=certifi, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===2022.9.24, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=certifi==2022.9.24)>, _ireq=None), Requirement(_name='charset-normalizer', vcs=None, req=NamedRequirement(name='charset-normalizer', version='==2.1.1', req=Requirement.parse('charset-normalizer==2.1.1; python_full_version >= "3.6.0"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=charset-normalizer, path=None, uri=None, extras=(), markers=python_full_version >= '3.6.0', vcs=None, specifier===2.1.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=charset-normalizer==2.1.1)>), markers='python_full_version >= "3.6.0"', _specifiers='==2.1.1', index=None, editable=False, hashes=frozenset({'sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f', 'sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=charset-normalizer, path=None, uri=None, extras=(), markers=python_full_version >= '3.6.0', vcs=None, specifier===2.1.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=charset-normalizer==2.1.1)>, _ireq=None), Requirement(_name='idna', vcs=None, req=NamedRequirement(name='idna', version='==3.4', req=Requirement.parse('idna==3.4; python_version >= "3.5"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=idna, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=idna==3.4)>), markers='python_version >= "3.5"', _specifiers='==3.4', index=None, editable=False, hashes=frozenset({'sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4', 'sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=idna, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=idna==3.4)>, _ireq=None), Requirement(_name='requests', vcs=None, req=NamedRequirement(name='requests', version='==2.28.1', req=Requirement.parse('requests==2.28.1; python_version >= "3.7" and python_version < "4"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=requests, path=None, uri=None, extras=(), markers=python_version >= '3.7' and python_version < '4', vcs=None, specifier===2.28.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=requests==2.28.1)>), markers='python_version >= "3.7" and python_version < "4"', _specifiers='==2.28.1', index=None, editable=False, hashes=frozenset({'sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983', 'sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=requests, path=None, uri=None, extras=(), markers=python_version >= '3.7' and python_version < '4', vcs=None, specifier===2.28.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=requests==2.28.1)>, _ireq=None), Requirement(_name='robotframework', vcs=None, req=NamedRequirement(name='robotframework', version='==6.0.1', req=Requirement.parse('robotframework==6.0.1'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=robotframework, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===6.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework==6.0.1)>), markers=None, _specifiers='==6.0.1', index='pypi', editable=False, hashes=frozenset({'sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea', 'sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=robotframework, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===6.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework==6.0.1)>, _ireq=None), Requirement(_name='robotframework-requests', vcs=None, req=NamedRequirement(name='robotframework-requests', version='==0.9.4', req=Requirement.parse('robotframework-requests==0.9.4'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=robotframework-requests, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===0.9.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework-requests==0.9.4)>), markers=None, _specifiers='==0.9.4', index='pypi', editable=False, hashes=frozenset({'sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2', 'sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=robotframework-requests, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===0.9.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework-requests==0.9.4)>, _ireq=None), Requirement(_name='urllib3', vcs=None, req=NamedRequirement(name='urllib3', version='==1.26.12', req=Requirement.parse('urllib3==1.26.12; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5" and python_version < "4"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=urllib3, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4', vcs=None, specifier===1.26.12, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=urllib3==1.26.12)>), markers='python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5" and python_version < "4"', _specifiers='==1.26.12', index=None, editable=False, hashes=frozenset({'sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e', 'sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=urllib3, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4', vcs=None, specifier===1.26.12, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=urllib3==1.26.12)>, _ireq=None)]
 Package installation failed...

Expected result

I should be able to install packages using pipenv.

Actual result

Installing dependencies from Pipfile.lock (330cd4)...
Installing dependencies from Pipfile.lock (330cd4)...
Writing supplied requirement line to temporary file: "certifi==2022.9.24 ; python_version >= '3.6' --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"
Writing supplied requirement line to temporary file: "charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 --hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
Writing supplied requirement line to temporary file: "idna==3.4 ; python_version >= '3.5' --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
Writing supplied requirement line to temporary file: "requests==2.28.1 ; python_version >= '3.7' and python_version < '4' --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349 --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
Writing supplied requirement line to temporary file: 'robotframework==6.0.1 --hash=sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea --hash=sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb'
Writing supplied requirement line to temporary file: 'robotframework-requests==0.9.4 --hash=sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2 --hash=sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82'
Writing supplied requirement line to temporary file: "urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"
Install Phase: Standard Requirements
Preparing Installation of 'certifi'
Preparing Installation of 'charset-normalizer'
Preparing Installation of 'idna'
Preparing Installation of 'requests'
Preparing Installation of 'robotframework'
Preparing Installation of 'robotframework-requests'
Preparing Installation of 'urllib3'
$ /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python /home/pi/.local/pipx/venvs/pipenv/lib/python3.10/site-packages/pipenv/patched/pip/__pip-runner__.py install -i https://pypi.org/simple --no-input --upgrade --no-deps --exists-action=i -r /tmp/pipenv-kxnjxwsm-requirements/pipenv-azacbxhq-hashed-reqs.txt
Using source directory: '/home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/src'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple

Collecting certifi==2022.9.24

  Using cached https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl (161 kB)

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    certifi==2022.9.24 from https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl#sha256=70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b (from -r /tmp/pipenv-kxnjxwsm-requirements/pipenv-azacbxhq-hashed-reqs.txt (line 1)):
        Expected sha256 0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14
        Expected     or 90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
             Got        70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b
An error occurred while installing certifi==2022.9.24 ; python_version >= '3.6' --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14! Will try again.
An error occurred while installing charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 --hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f! Will try again.
An error occurred while installing idna==3.4 ; python_version >= '3.5' --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2! Will try again.
An error occurred while installing requests==2.28.1 ; python_version >= '3.7' and python_version < '4' --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349 --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983! Will try again.
An error occurred while installing robotframework==6.0.1 --hash=sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea --hash=sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb! Will try again.
An error occurred while installing robotframework-requests==0.9.4 --hash=sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2 --hash=sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82! Will try again.
An error occurred while installing urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e! Will try again.
Installing initially failed dependencies...
Writing supplied requirement line to temporary file: "certifi==2022.9.24 ; python_version >= '3.6' --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"
Writing supplied requirement line to temporary file: "charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 --hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
Writing supplied requirement line to temporary file: "idna==3.4 ; python_version >= '3.5' --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
Writing supplied requirement line to temporary file: "requests==2.28.1 ; python_version >= '3.7' and python_version < '4' --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349 --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
Writing supplied requirement line to temporary file: 'robotframework==6.0.1 --hash=sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea --hash=sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb'
Writing supplied requirement line to temporary file: 'robotframework-requests==0.9.4 --hash=sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2 --hash=sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82'
Writing supplied requirement line to temporary file: "urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"
Install Phase: Standard Requirements
Preparing Installation of 'certifi'
Preparing Installation of 'charset-normalizer'
Preparing Installation of 'idna'
Preparing Installation of 'requests'
Preparing Installation of 'robotframework'
Preparing Installation of 'robotframework-requests'
Preparing Installation of 'urllib3'
$ /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python /home/pi/.local/pipx/venvs/pipenv/lib/python3.10/site-packages/pipenv/patched/pip/__pip-runner__.py install -i https://pypi.org/simple --no-input --upgrade --no-use-pep517 --no-deps --exists-action=i -r /tmp/pipenv-kxnjxwsm-requirements/pipenv-y_ydzh2m-hashed-reqs.txt
Using source directory: '/home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/src'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple

Collecting certifi==2022.9.24

  Using cached https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl (161 kB)

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    certifi==2022.9.24 from https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl#sha256=70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b (from -r /tmp/pipenv-kxnjxwsm-requirements/pipenv-y_ydzh2m-hashed-reqs.txt (line 1)):
        Expected sha256 0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14
        Expected     or 90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
             Got        70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b
[pipenv.exceptions.InstallError]: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
[pipenv.exceptions.InstallError]:     certifi==2022.9.24 from https://www.piwheels.org/simple/certifi/certifi-2022.9.24-py3-none-any.whl#sha256=70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b (from -r /tmp/pipenv-kxnjxwsm-requirements/pipenv-y_ydzh2m-hashed-reqs.txt (line 1)):
[pipenv.exceptions.InstallError]:         Expected sha256 0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14
[pipenv.exceptions.InstallError]:         Expected     or 90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
[pipenv.exceptions.InstallError]:              Got        70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b
ERROR: Couldn't install package: [Requirement(_name='certifi', vcs=None, req=NamedRequirement(name='certifi', version='==2022.9.24', req=Requirement.parse('certifi==2022.9.24; python_version >= "3.6"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=certifi, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===2022.9.24, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=certifi==2022.9.24)>), markers='python_version >= "3.6"', _specifiers='==2022.9.24', index=None, editable=False, hashes=frozenset({'sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382', 'sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=certifi, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===2022.9.24, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=certifi==2022.9.24)>, _ireq=None), Requirement(_name='charset-normalizer', vcs=None, req=NamedRequirement(name='charset-normalizer', version='==2.1.1', req=Requirement.parse('charset-normalizer==2.1.1; python_full_version >= "3.6.0"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=charset-normalizer, path=None, uri=None, extras=(), markers=python_full_version >= '3.6.0', vcs=None, specifier===2.1.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=charset-normalizer==2.1.1)>), markers='python_full_version >= "3.6.0"', _specifiers='==2.1.1', index=None, editable=False, hashes=frozenset({'sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845', 'sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=charset-normalizer, path=None, uri=None, extras=(), markers=python_full_version >= '3.6.0', vcs=None, specifier===2.1.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=charset-normalizer==2.1.1)>, _ireq=None), Requirement(_name='idna', vcs=None, req=NamedRequirement(name='idna', version='==3.4', req=Requirement.parse('idna==3.4; python_version >= "3.5"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=idna, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=idna==3.4)>), markers='python_version >= "3.5"', _specifiers='==3.4', index=None, editable=False, hashes=frozenset({'sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4', 'sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=idna, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=idna==3.4)>, _ireq=None), Requirement(_name='requests', vcs=None, req=NamedRequirement(name='requests', version='==2.28.1', req=Requirement.parse('requests==2.28.1; python_version >= "3.7" and python_version < "4"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=requests, path=None, uri=None, extras=(), markers=python_version >= '3.7' and python_version < '4', vcs=None, specifier===2.28.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=requests==2.28.1)>), markers='python_version >= "3.7" and python_version < "4"', _specifiers='==2.28.1', index=None, editable=False, hashes=frozenset({'sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349', 'sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=requests, path=None, uri=None, extras=(), markers=python_version >= '3.7' and python_version < '4', vcs=None, specifier===2.28.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=requests==2.28.1)>, _ireq=None), Requirement(_name='robotframework', vcs=None, req=NamedRequirement(name='robotframework', version='==6.0.1', req=Requirement.parse('robotframework==6.0.1'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=robotframework, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===6.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework==6.0.1)>), markers=None, _specifiers='==6.0.1', index='pypi', editable=False, hashes=frozenset({'sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea', 'sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=robotframework, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===6.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework==6.0.1)>, _ireq=None), Requirement(_name='robotframework-requests', vcs=None, req=NamedRequirement(name='robotframework-requests', version='==0.9.4', req=Requirement.parse('robotframework-requests==0.9.4'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=robotframework-requests, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===0.9.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework-requests==0.9.4)>), markers=None, _specifiers='==0.9.4', index='pypi', editable=False, hashes=frozenset({'sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2', 'sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=robotframework-requests, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===0.9.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=robotframework-requests==0.9.4)>, _ireq=None), Requirement(_name='urllib3', vcs=None, req=NamedRequirement(name='urllib3', version='==1.26.12', req=Requirement.parse('urllib3==1.26.12; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5" and python_version < "4"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=urllib3, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4', vcs=None, specifier===1.26.12, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=urllib3==1.26.12)>), markers='python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5" and python_version < "4"', _specifiers='==1.26.12', index=None, editable=False, hashes=frozenset({'sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997', 'sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=urllib3, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4', vcs=None, specifier===1.26.12, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=urllib3==1.26.12)>, _ireq=None)]
 Package installation failed...

Steps to replicate

I've installed pipenv using the following steps:

  1. Install pyenv manually (running the steps from https://github.com/pyenv/pyenv-installer)
  2. Installed pipenv via pipx
  3. Created a simple Pipefile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
robotframework = "5.0.x"
robotframework-requests = "0.9.x"

[requires]
python_version = "3.10"
  1. Ran pipenv shell
Creating a virtualenv for this project...
Pipfile: /home/pi/test-pipenv/Pipfile
Using /home/pi/.pyenv/versions/3.10.8/bin/python3 (3.10.8) to create virtualenv...
⠸ Creating virtual environment...created virtual environment CPython3.10.8.final.0-32 in 664ms
  creator Venv(dest=/home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz, clear=False, no_vcs_ignore=False, global=False, describe=CPython3Posix)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/pi/.local/share/virtualenv)
    added seed packages: pip==22.3, setuptools==65.5.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz
Launching subshell in virtual environment...
 . /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/activate
  1. Ran pipenv install --dev

$ pipenv --support

Pipenv version: '2022.11.5'

Pipenv location: '/home/pi/.local/pipx/venvs/pipenv/lib/python3.10/site-packages/pipenv'

Python location: '/home/pi/.local/pipx/venvs/pipenv/bin/python'

OS Name: 'posix'

User pip version: '22.3'

user Python installations found:

  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python3
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python3
  • 3.10.8: /home/pi/.pyenv/versions/3.10.8/bin/python
  • 3.7.3: /usr/bin/python3.7m
  • 3.7.3: /usr/bin/python3
  • 3.7.3: /usr/bin/python3.7
  • 3.7.3: /bin/python3.7m
  • 3.7.3: /bin/python3
  • 3.7.3: /bin/python3.7
  • 2.7.16: /usr/bin/python2.7
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python
  • 2.7.16: /bin/python2.7
  • 2.7.16: /bin/python2
  • 2.7.16: /bin/python
  • 2.7.13: /usr/bin/pypy
  • 2.7.13: /bin/pypy

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.10.8',
 'os_name': 'posix',
 'platform_machine': 'armv7l',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.10.17-v7l+',
 'platform_system': 'Linux',
 'platform_version': '#1414 SMP Fri Apr 30 13:20:47 BST 2021',
 'python_full_version': '3.10.8',
 'python_version': '3.10',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • PYENV_SHELL
  • PIPENV_ACTIVE
  • NO_AT_BRIDGE
  • GOBIN
  • PWD
  • LOGNAME
  • XDG_SESSION_TYPE
  • PIP_PYTHON_PATH
  • HOME
  • LANG
  • LS_COLORS
  • VIRTUAL_ENV
  • GOROOT
  • PYTHONFINDER_IGNORE_UNSUPPORTED
  • XDG_SESSION_CLASS
  • TERM
  • USER
  • PIP_DISABLE_PIP_VERSION_CHECK
  • SHLVL
  • XDG_SESSION_ID
  • PYTHONDONTWRITEBYTECODE
  • LC_CTYPE
  • XDG_RUNTIME_DIR
  • PS1
  • LC_ALL
  • PATH
  • DBUS_SESSION_BUS_ADDRESS
  • MAIL
  • SSH_TTY
  • OLDPWD
  • GOPATH
  • TEXTDOMAIN
  • _

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin:/home/pi/.local/bin:/home/pi/bin:/home/pi/.pyenv/shims:/home/pi/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/pi/go/bin
  • SHELL: /bin/bash
  • LANG: en_GB.UTF-8
  • PWD: /home/pi/test-pipenv
  • VIRTUAL_ENV: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz

Contents of Pipfile ('/home/pi/test-pipenv/Pipfile'):

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
robotframework = "5.0.x"
robotframework-requests = "0.9.x"

[requires]
python_version = "3.10"

Contents of Pipfile.lock ('/home/pi/test-pipenv/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "42fb511e92c0ac3fc0701ad0c1f95ae3faa7264db1b81b111faea4517e330cd4"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.10"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {
        "certifi": {
            "hashes": [
                "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14",
                "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==2022.9.24"
        },
        "charset-normalizer": {
            "hashes": [
                "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845",
                "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
            ],
            "markers": "python_full_version >= '3.6.0'",
            "version": "==2.1.1"
        },
        "idna": {
            "hashes": [
                "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4",
                "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
            ],
            "markers": "python_version >= '3.5'",
            "version": "==3.4"
        },
        "requests": {
            "hashes": [
                "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983",
                "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
            ],
            "markers": "python_version >= '3.7' and python_version < '4'",
            "version": "==2.28.1"
        },
        "robotframework": {
            "hashes": [
                "sha256:5f665413845dfea603de1ed0d0ba8928748ccd2f9a558889822916d778731fbb",
                "sha256:b2d9a82912dfd27aae7afaad64771c58f5d948ca9d64e3ae72b16721b5e022ea"
            ],
            "index": "pypi",
            "version": "==6.0.1"
        },
        "robotframework-requests": {
            "hashes": [
                "sha256:e00943b8526c38bed5c3c661c813ec9d5a2106961bd91da0068712c2a0d49e82",
                "sha256:fed02b07fd665c96d7473f311552eb7dc7a266c75f8f6166f92dc82371a018f2"
            ],
            "index": "pypi",
            "version": "==0.9.4"
        },
        "urllib3": {
            "hashes": [
                "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e",
                "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'",
            "version": "==1.26.12"
        }
    }
}
@matteius matteius added OS: Raspberry Pi Issue affects one of the OS of the Raspberry Pi platform triage labels Nov 11, 2022
@matteius
Copy link
Member

@rolandjitsu You have both of the hashes from pypip, there are only two packages, but the thing I wonder about, why is it searching also in https://www.piwheels.org/simple?

@matteius
Copy link
Member

matteius commented Nov 11, 2022

@rolandjitsu Actually going to pipwheels.org answered my first question, so I think the issue is that you need to set your primary source in the pipfile as:

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "pywheels"

Perhaps make this the default section and just remove pypi altogether? You would then need to relock.

@rolandjitsu
Copy link
Author

@rolandjitsu Actually going to pipwheels.org answered my first question, so I think the issue is that you need to set your primary source in the pipfile as:

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "pywheels"

Perhaps make this the default section and just remove pypi altogether? You would then need to relock.

Just tried your suggestion and got:

Pipfile.lock (330cd4) out of date, updating to (582680)...
Locking [packages] dependencies...
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Updated Pipfile.lock (12be8d857ca64115ab9e634dad9259d39b73fcad2a0e9de5565069ff63582680)!
Installing dependencies from Pipfile.lock (582680)...
Installing dependencies from Pipfile.lock (582680)...
Traceback (most recent call last):
  File "/home/pi/.pyenv/versions/3.10.8/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/cli/command.py", line 236, in install
    do_install(
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/core.py", line 2244, in do_install
    do_init(
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/core.py", line 1378, in do_init
    do_install_dependencies(
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/core.py", line 888, in do_install_dependencies
    batch_install(
  File "/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv/core.py", line 742, in batch_install
    install_source = next(filter(lambda s: s["name"] == index_name, sources))
StopIteration

Using Pipefile:

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "pywheels"

[dev-packages]
robotframework = "5.0.x"
robotframework-requests = "0.9.x"

[requires]
python_version = "3.10"

Then removed the lock file, did a pipenv clean and again install and it seems to work 🎉 Thanks a lot! Though I wonder why the other source doesn't work 😕 I use that source on other machines (mainly macOS) without issues.

I've spent a few days thinking this is an issue with the way I install pyenv + pipenv and tried different ways to do it 🤦

Do you have a document or something with recommendations on how to install pyenv + pipenv on Linux (debian) while the system python is also installed? E.g, do I use a system pip to install pipenv or should I first activate a pyenv python version and install pipenv there?

@matteius
Copy link
Member

@rolandjitsu The StopIteration thing and having to remove the lock file first was a different bug #5456 which I did a fix for two nights ago -- it will be in the next release then the lock file would have updated normally.

I wonder why the other source doesn't work 😕 I use that source on other machines (mainly macOS) without issues.

Must be something on Raspbian telling pip to use piwheeels.org as an extra source? I noticed it was trying to install the binaries from piwheels.org which are wheel files intended for the arm processor of Raspberry Pi.

Do you have a document or something with recommendations on how to install pyenv + pipenv on Linux (debian) while the system python is also installed? E.g, do I use a system pip to install pipenv or should I first activate a pyenv python version and install pipenv there?

I think you would install pipenv with pip install pipenv --user normally with the system python, no virtualenv. I checked on my linux system, I just add the relevant locations that pipenv and pyenv are installed, to the PATH:

export PATH=$PATH:~/.local/bin
export PATH=$PATH:~/.pyenv/bin

@matteius matteius added the Type: Question ❔ This is a question or a request for support. label Nov 11, 2022
@rolandjitsu
Copy link
Author

@rolandjitsu The StopIteration thing and having to remove the lock file first was a different bug #5456 which I did a fix for two nights ago -- it will be in the next release then the lock file would have updated normally.

Ok, got it. I think the workaround is also fine as long as it works. But it's good to know it's been fixed!

Must be something on Raspbian telling pip to use piwheeels.org as an extra source? I noticed it was trying to install the binaries from piwheels.org which are wheel files intended for the arm processor of Raspberry Pi.

It could be, yes. The suggestion you provided is good enough. Could be worth mentioning somewhere in the troubleshooting guide if others encounter the same issue.

I think you would install pipenv with pip install pipenv --user normally with the system python, no virtualenv. I checked on my linux system, I just add the relevant locations that pipenv and pyenv are installed, to the PATH:

Ok. I'll use the same approach then. Thanks for sharing.

I guess the issue can be closed now. Thanks for the quick response and help!

@matteius matteius added the Type: Documentation 📖 This issue relates to documentation of pipenv. label Nov 13, 2022
@MefhigosetH
Copy link

Dear @rolandjitsu ,

I face the same issue on a Raspberry pi 4B+ v1.4 with Raspberry Pi OS Lite 64-bits (Release date: September 22nd 2022).

My Pipfile project file is:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyzk = "*"
pyodbc = "*"
fpdf = "*"
sendgrid = "*"
sentry-sdk = "*"

[dev-packages]

On the piwheels.org homepage state that they use the file /etc/pip.conf. I renamed this file to /etc/_pip.conf and the problem has gone. Now my pipenv install works fine.

The commands:

$ pipenv --rm
$ sudo apt install unixodbc-dev unixodbc
$ sudo apt clean
$ sudo mv /etc/pip.conf /etc/_pip.conf
$ pipenv --clear
$ pipenv install

More info about my system:

$ python --version && pip3 --version && pipenv --version
Python 3.9.2
pip 22.3.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)
pipenv, version 2022.11.5
$ uname -a
Linux cfee-rpi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ pinout
,--------------------------------.
| oooooooooooooooooooo J8   +======
| 1ooooooooooooooooooo  PoE |   Net
|  Wi                    1o +======
|  Fi  Pi Model 4B  V1.4 oo      |
|        ,----. +---+         +====
| |D|    |SoC | |RAM|         |USB3
| |S|    |    | |   |         +====
| |I|    `----' +---+            |
|                   |C|       +====
|                   |S|       |USB2
| pwr   |hd|   |hd| |I||A|    +====
`-| |---|m0|---|m1|----|V|-------'

Revision           : c03114
SoC                : BCM2711
RAM                : 4GB
Storage            : MicroSD
USB ports          : 4 (of which 2 USB3)
Ethernet ports     : 1 (1000Mbps max. speed)
Wi-fi              : True
Bluetooth          : True
Camera ports (CSI) : 1
Display ports (DSI): 1

@rolandjitsu
Copy link
Author

@MefhigosetH thanks for the suggestion. I'll give that a try as well.

@rolandjitsu
Copy link
Author

rolandjitsu commented Nov 15, 2022

@matteius I am now facing a different issue when installing pipenv using the system python but trying to init a pipenv env using a pyenv python:

$ pipenv -v --python 3.10
Using python: 3.10
Path to python: /home/pi/.pyenv/versions/3.10.8/bin/python3
Creating a virtualenv for this project...
Pipfile: /home/pi/test-pipenv/Pipfile
Using /home/pi/.pyenv/versions/3.10.8/bin/python3 (3.10.8) to create virtualenv...
⠹ Creating virtual environment...
✘ Failed creating virtual environment 
[pipenv.exceptions.VirtualenvCreationException]: Usage: virtualenv.py [OPTIONS] DEST_DIR

virtualenv.py: error: no such option: --creator

Failed to create virtual environment.
$ pipenv --support

Pipenv version: '2022.11.11'

Pipenv location: '/usr/local/lib/python3.7/dist-packages/pipenv'

Python location: '/usr/bin/python3'

OS Name: 'posix'

User pip version: '22.3'

user Python installations found:

  • 3.10.8: /home/pi/.pyenv/versions/3.10.8/bin/python
  • 3.7.3: /usr/bin/python3.7m
  • 3.7.3: /usr/bin/python3
  • 3.7.3: /usr/bin/python3.7
  • 3.7.3: /bin/python3.7m
  • 3.7.3: /bin/python3
  • 3.7.3: /bin/python3.7
  • 2.7.16: /usr/bin/python2.7
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python
  • 2.7.16: /bin/python2.7
  • 2.7.16: /bin/python2
  • 2.7.16: /bin/python
  • 2.7.13: /usr/bin/pypy
  • 2.7.13: /bin/pypy

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.3',
 'os_name': 'posix',
 'platform_machine': 'armv7l',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.10.103-v7l+',
 'platform_system': 'Linux',
 'platform_version': '#1529 SMP Tue Mar 8 12:24:00 GMT 2022',
 'python_full_version': '3.7.3',
 'python_version': '3.7',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • PYENV_SHELL
  • NO_AT_BRIDGE
  • GOBIN
  • PWD
  • PYENV_VIRTUALENV_INIT
  • LOGNAME
  • XDG_SESSION_TYPE
  • HOME
  • LANG
  • LS_COLORS
  • GOROOT
  • XDG_SESSION_CLASS
  • TERM
  • USER
  • SHLVL
  • XDG_SESSION_ID
  • LC_CTYPE
  • XDG_RUNTIME_DIR
  • PYENV_ROOT
  • LC_ALL
  • PATH
  • DBUS_SESSION_BUS_ADDRESS
  • MAIL
  • SSH_TTY
  • GOPATH
  • TEXTDOMAIN
  • _
  • OLDPWD
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/pi/.local/bin:/home/pi/bin:/home/pi/.pyenv/plugins/pyenv-virtualenv/shims:/home/pi/.pyenv/shims:/home/pi/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/pi/go/bin
  • SHELL: /bin/bash
  • LANG: en_GB.UTF-8
  • PWD: /home/pi/test-pipenv

Contents of Pipfile ('/home/pi/test-pipenv/Pipfile'):

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "pywheels"

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
robotframework = "5.0.x"
robotframework-requests = "0.9.x"

[requires]
python_version = "3.10"

Removing system wide pipenv and installing in the pyenv context seems to work:

$ pipenv --support

Pipenv version: '2022.11.11'

Pipenv location: '/home/pi/.pyenv/versions/3.10.8/lib/python3.10/site-packages/pipenv'

Python location: '/home/pi/.pyenv/versions/3.10.8/bin/python3.10'

OS Name: 'posix'

User pip version: '22.3'

user Python installations found:

  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python3
  • 3.10.8: /home/pi/.pyenv/versions/3.10.8/bin/python
  • 3.10.8: /home/pi/.pyenv/versions/3.10.8/bin/python3
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python
  • 3.10.8: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin/python3
  • 3.10.8: /home/pi/.pyenv/versions/3.10.8/bin/python
  • 3.7.3: /usr/bin/python3.7m
  • 3.7.3: /usr/bin/python3
  • 3.7.3: /usr/bin/python3.7
  • 3.7.3: /bin/python3.7m
  • 3.7.3: /bin/python3
  • 3.7.3: /bin/python3.7
  • 2.7.16: /usr/bin/python2.7
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python
  • 2.7.16: /bin/python2.7
  • 2.7.16: /bin/python2
  • 2.7.16: /bin/python
  • 2.7.13: /usr/bin/pypy
  • 2.7.13: /bin/pypy

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.10.8',
 'os_name': 'posix',
 'platform_machine': 'armv7l',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.10.103-v7l+',
 'platform_system': 'Linux',
 'platform_version': '#1529 SMP Tue Mar 8 12:24:00 GMT 2022',
 'python_full_version': '3.10.8',
 'python_version': '3.10',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • PYENV_HOOK_PATH
  • PYENV_SHELL
  • PIPENV_ACTIVE
  • NO_AT_BRIDGE
  • GOBIN
  • PWD
  • PYENV_VIRTUALENV_INIT
  • LOGNAME
  • XDG_SESSION_TYPE
  • PIP_PYTHON_PATH
  • HOME
  • LANG
  • LS_COLORS
  • VIRTUAL_ENV
  • SSH_CONNECTION
  • GOROOT
  • PYENV_DIR
  • XDG_SESSION_CLASS
  • TERM
  • USER
  • PIP_DISABLE_PIP_VERSION_CHECK
  • SHLVL
  • XDG_SESSION_ID
  • PYTHONDONTWRITEBYTECODE
  • LC_CTYPE
  • XDG_RUNTIME_DIR
  • SSH_CLIENT
  • PYENV_ROOT
  • LC_ALL
  • PATH
  • DBUS_SESSION_BUS_ADDRESS
  • MAIL
  • MCU_SRV_CERT
  • SSH_TTY
  • OLDPWD
  • GOPATH
  • TEXTDOMAIN
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: /home/pi/.pyenv/versions/3.10.8/bin:/home/pi/.pyenv/libexec:/home/pi/.pyenv/plugins/python-build/bin:/home/pi/.pyenv/plugins/pyenv-virtualenv/bin:/home/pi/.pyenv/plugins/pyenv-update/bin:/home/pi/.pyenv/plugins/pyenv-installer/bin:/home/pi/.pyenv/plugins/pyenv-doctor/bin:/home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz/bin:/home/pi/.pyenv/plugins/pyenv-virtualenv/shims:/home/pi/.pyenv/shims:/home/pi/.pyenv/versions/3.10.8/bin:/home/pi/.pyenv/libexec:/home/pi/.pyenv/plugins/python-build/bin:/home/pi/.pyenv/plugins/pyenv-virtualenv/bin:/home/pi/.pyenv/plugins/pyenv-update/bin:/home/pi/.pyenv/plugins/pyenv-installer/bin:/home/pi/.pyenv/plugins/pyenv-doctor/bin:/home/pi/.local/bin:/home/pi/bin:/home/pi/.pyenv/plugins/pyenv-virtualenv/shims:/home/pi/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/pi/go/bin
  • SHELL: /bin/bash
  • LANG: en_GB.UTF-8
  • PWD: /home/pi/test-pipenv
  • VIRTUAL_ENV: /home/pi/.local/share/virtualenvs/test-pipenv-VvuyqbGz

Contents of Pipfile ('/home/pi/test-pipenv/Pipfile'):

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "pywheels"

[dev-packages]
robotframework = "5.0.x"
robotframework-requests = "0.9.x"

[requires]
python_version = "3.10"

Contents of Pipfile.lock ('/home/pi/test-pipenv/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "12be8d857ca64115ab9e634dad9259d39b73fcad2a0e9de5565069ff63582680"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.10"
        },
        "sources": [
            {
                "name": "pywheels",
                "url": "https://www.piwheels.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {
        "certifi": {
            "hashes": [
                "sha256:70fa284520b2a9be47502025d8a755e6bdb06327baaa9097fe59759c236ade4b"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==2022.9.24"
        },
        "charset-normalizer": {
            "hashes": [
                "sha256:9ff357cacd4163b3a6aa343bc166533cd0cf173323b885b7ea2094a7fa1cec24"
            ],
            "markers": "python_full_version >= '3.6.0'",
            "version": "==2.1.1"
        },
        "idna": {
            "hashes": [
                "sha256:bcac1132a4eadea8321490704e2349b752e29c6ec2f1c27d372010e76ebd3fa1"
            ],
            "markers": "python_version >= '3.5'",
            "version": "==3.4"
        },
        "requests": {
            "hashes": [
                "sha256:f598c2ccf6521aa5a214a537caf4aa57d359d0a9040a62f9e23f1d973512c0b8"
            ],
            "markers": "python_version >= '3.7' and python_version < '4'",
            "version": "==2.28.1"
        },
        "robotframework": {
            "hashes": [
                "sha256:f44f89d72fc95c1e0a9bb454cc04589ecbdc9bb561a7629344e5eecf789f7e35"
            ],
            "index": "pywheels",
            "version": "==6.0.1"
        },
        "robotframework-requests": {
            "hashes": [
                "sha256:fa839318b298da3468ca3575f2ed72efd61cb780136b9fa1a24ddcb7eb66caad"
            ],
            "index": "pywheels",
            "version": "==0.9.4"
        },
        "urllib3": {
            "hashes": [
                "sha256:45b4bf2512fa6778e7c89c307a03af193251de4b6ad6ac2705fed3fb19b2ade1"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'",
            "version": "==1.26.12"
        }
    }
}

@matteius
Copy link
Member

@rolandjitsu Sorry just saw this -- I don't think that is the right way to pass --python to the project -- you can see its using the path Path to python: /home/pi/.pyenv/versions/3.10.8/bin/python3 right after that. Trying supplying the full path to a python binary with the --python flag. Also you may need to supply it using a pipenv install command, I forget if the base pipenv command will handle the --python argument ...

@taco-ops
Copy link

taco-ops commented Apr 3, 2024

Dear @rolandjitsu ,

I face the same issue on a Raspberry pi 4B+ v1.4 with Raspberry Pi OS Lite 64-bits (Release date: September 22nd 2022).

My Pipfile project file is:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyzk = "*"
pyodbc = "*"
fpdf = "*"
sendgrid = "*"
sentry-sdk = "*"

[dev-packages]

On the piwheels.org homepage state that they use the file /etc/pip.conf. I renamed this file to /etc/_pip.conf and the problem has gone. Now my pipenv install works fine.

The commands:

$ pipenv --rm
$ sudo apt install unixodbc-dev unixodbc
$ sudo apt clean
$ sudo mv /etc/pip.conf /etc/_pip.conf
$ pipenv --clear
$ pipenv install

More info about my system:

$ python --version && pip3 --version && pipenv --version
Python 3.9.2
pip 22.3.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)
pipenv, version 2022.11.5
$ uname -a
Linux cfee-rpi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ pinout
,--------------------------------.
| oooooooooooooooooooo J8   +======
| 1ooooooooooooooooooo  PoE |   Net
|  Wi                    1o +======
|  Fi  Pi Model 4B  V1.4 oo      |
|        ,----. +---+         +====
| |D|    |SoC | |RAM|         |USB3
| |S|    |    | |   |         +====
| |I|    `----' +---+            |
|                   |C|       +====
|                   |S|       |USB2
| pwr   |hd|   |hd| |I||A|    +====
`-| |---|m0|---|m1|----|V|-------'

Revision           : c03114
SoC                : BCM2711
RAM                : 4GB
Storage            : MicroSD
USB ports          : 4 (of which 2 USB3)
Ethernet ports     : 1 (1000Mbps max. speed)
Wi-fi              : True
Bluetooth          : True
Camera ports (CSI) : 1
Display ports (DSI): 1

Hello from 2024, this solved my problem :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Raspberry Pi Issue affects one of the OS of the Raspberry Pi platform triage Type: Documentation 📖 This issue relates to documentation of pipenv. Type: Question ❔ This is a question or a request for support.
Projects
None yet
Development

No branches or pull requests

4 participants