无法使用3.7制作的pipfile在3.8上安装本地车轮依赖项

时间:2020-08-04 13:41:18

标签: python python-3.x pipenv

我最近重新打开了一年多以前写的脚本,但是无法从Pipfile安装所有pipenv依赖项。

尤其是python_ldap滚轮失败(该滚轮位于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"

可能是什么问题? pipenv install已从pipenv shell(全新)制成的外壳中启动。

该脚本已在Windows 7上使用Python 3.7编写;现在我在使用Python 3.8的Windows 10上。我认为这些不会有所作为,但我不知道。


更新

我找到了问题Cannot install numpy from wheel formataccepted anwser。虽然那里的命令建议在我的机器上出现错误,但我注意到启动python命令会得到:

Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32

听起来不对劲,我在x64 Windows 10计算机上。我的安装损坏了吗?

更新/ 2

我都尝试过

  • python_ldap-3.3.1-cp39-cp39-win_amd64.whl
  • python_ldap-3.3.1-cp39-cp39-win32.whl

但没有任何效果,给出:

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.

和:

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.

更新/ 3

最后,python_ldap-3.3.1-cp38-cp38-win_amd64.whl工作了。

我猜XY中的cpXY指的是Python版本,并且-也许pipenv-对最低版本也很挑剔,拒绝了原始的轮子python_ldap-3.1.0-cp37-cp37m-win_amd64.whl,因为它“太旧了” “为3.8?

0 个答案:

没有答案