问题
I recently reopened a script I wrote more than one year ago, but failed to install all pipenv
dependencies from Pipfile.
In particular python_ldap
wheel fails (the wheel is in a local folder next to the Pipfile):
Pipfile.lock (3d2ab2) out of date, updating to (98503a)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Locking... Resolving dependencies...
Success!
Updated Pipfile.lock (98503a)!
Installing dependencies from Pipfile.lock (98503a)…
An error occurred while installing ./dependencies/python_ldap-3.1.0-cp37-cp37m-win_amd64.whl --hash=sha256:41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5 --hash=sha256:a424ecb9f16ab7723d570c12713dd2f3ae84c605c93ee19d6cc1c47fec61815b! Will try again.
================================ 9/9 - 00:00:10
Installing initially failed dependencies…
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\cli\command.py", line 232, in install
[InstallError]: retcode = do_install(
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\core.py", line 2051, in do_install
[InstallError]: do_init(
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\core.py", line 1306, in do_init
[InstallError]: do_install_dependencies(
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\core.py", line 900, in do_install_dependencies
[InstallError]: batch_install(
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\core.py", line 796, in batch_install
[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]: File "c:\program files\python38\lib\site-packages\pipenv\core.py", line 703, in _cleanup_procs
[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ERROR: python_ldap-3.1.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
ERROR: Couldn't install package: python-ldap
Package installation failed...
================================ 0/1 - 00:00:03
Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
python-ldap = {path = "./dependencies/python_ldap-3.1.0-cp37-cp37m-win_amd64.whl"}
requests = "~=2.0"
mysqlclient = "~=1.0"
[dev-packages]
[requires]
python_version = "3.8"
What could be wrong? The pipenv install
ha been launched from within the shell made with pipenv shell
(which is brand new).
The script has been written on Windows 7 with Python 3.7; now I'm on Windows 10 with Python 3.8. I wouldn't think these make a difference, but I have no clue.
UPDATE
I found the question Cannot install numpy from wheel format and the accepted anwser. While the command there suggested gave an error on my box, I noticed that launching the python command I get:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Which doesn't sound right to me, I'm on a x64 Windows 10 machine. Do I have a broken installation or something?
UPDATE / 2
I tried both:
- python_ldap-3.3.1-cp39-cp39-win_amd64.whl
- python_ldap-3.3.1-cp39-cp39-win32.whl
but none worked, giving:
Installing dependencies\python_ldap-3.3.1-cp39-cp39-win_amd64.whl…
Error: An error occurred while installing dependencies\python_ldap-3.3.1-cp39-cp39-win_amd64.whl!
Error text:
ERROR: python_ldap-3.3.1-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
and:
Installing dependencies\python_ldap-3.3.1-cp39-cp39-win32.whl…
Error: An error occurred while installing dependencies\python_ldap-3.3.1-cp39-cp39-win32.whl!
Error text:
ERROR: python_ldap-3.3.1-cp39-cp39-win32.whl is not a supported wheel on this platform.
UPDATE / 3
Finally, python_ldap-3.3.1-cp38-cp38-win_amd64.whl
worked.
I guess the XY
in cpXY
refers to the Python version and - maybe pipenv - is being picky about the minimum version too, rejecting the original wheel python_ldap-3.1.0-cp37-cp37m-win_amd64.whl
because it's "too old" for 3.8?
来源:https://stackoverflow.com/questions/63248183/cannot-install-local-wheel-dependency-on-3-8-from-pipfile-made-with-3-7