在为pytorch(python环境)安装apex扩展时,显示以下错误,我无法解决此问题

2024-10-04 05:26:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我想为我的pytorch环境安装apex扩展,我的系统是windows 10,我使用的是python版本3.8.1,pip版本是20.0.2

我从这个https://github.com/NVIDIA/apex读了指令,然后执行了命令

pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext

正在显示此错误

c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\pip_internal\commands\install.py:244: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. cmdoptions.check_install_build_global(options) Non-user install because site-packages writeable Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-ephem-wheel-cache-ehoqwpvf Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi Initialized build tracking at C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi Created build tracker: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi Entered build tracker: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-install-rivnsaa9 Cleaning up... Removed build tracker: 'C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi' ERROR: You must give at least one requirement to install (see "pip help install") Exception information: Traceback (most recent call last): File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\base_command.py", line 186, in _main status = self.run(options, args)

请解决这个问题


Tags: installpipbuildlocalsiteglobaltrackerreq
1条回答
网友
1楼 · 发布于 2024-10-04 05:26:55
pip install -v  no-cache-dir  global-option=" cpp_ext"  global-option=" cuda_ext

链接中指定的行为

$ pip install -v  no-cache-dir  global-option=" cpp_ext"  global-option=" cuda_ext" ./

请注意,您缺少了最后一个./,这就是为什么pip告诉您这一点

You must give at least one requirement to install (see "pip help install")

你告诉它安装,但你没有告诉它安装什么

相关问题 更多 >