提问人:Sarah 提问时间:11/17/2023 更新时间:11/17/2023 访问量:34
尝试使用平台 pip 下载manylinux1_x86_64仍然为 Windows 提供错误
Trying pip download with platform manylinux1_x86_64 still gives error for windows
问:
我有一个未连接到互联网的 Web 服务器 (debian),并希望在其中运行我的代码。我的代码在我的本地机器(windows)上运行,并且还让它运行在可以访问互联网的开发服务器(debian)上
为此,我想
- 在我的本地计算机(即 Windows 计算机)中下载所有需要的 pip 库
- 将此库上传到 Web 服务器,这是一台 Debian 机器
在我的本地机器中,我创建了一个 venvpython -m venv .venv
我从开发服务器中提取了所有需要的库(以获得与 debian 相同的库版本)pip freeze > requirements.txt
在我的 Windows 机器上,通过 venv,我运行了这个命令
pip download --platform manylinux1_x86_64 --no-deps --python-version 311 -r requirements.txt
大多数库似乎都在下载,直到我在下载 uvloop 库时遇到此错误:
Collecting uvloop
Using cached uvloop-0.19.0.tar.gz (2.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "C:\Users\**\Downloads\requirements\backend\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\**\Downloads\requirements\backend\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\**\Downloads\requirements\backend\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\**\AppData\Local\Temp\pip-build-env-u9ekvm49\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\**\AppData\Local\Temp\pip-build-env-u9ekvm49\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\**\AppData\Local\Temp\pip-build-env-u9ekvm49\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 8, in <module>
RuntimeError: uvloop does not support Windows at the moment
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
这是否意味着 --platform 选项被忽略?它不应该下载适用于 Linux 的版本吗?
我还注意到在其他 2 个库中,它找不到它们的任何版本,这没有意义,因为它们已经安装在另一台开发机器中。这些库包括:
- onnx运行时
- pulsar-client
答: 暂无答案
评论
manylinux_2_17_x86_64
manylinux2014_x86_64
--only-binary :all:
pip download
对于不同的平台来说,这并不真正有效。使用目标平台(处理器、操作系统、Python 版本)运行虚拟机或容器。