gpt4 book ai didi

python - 如何在 Google Colab 上安装 nvidia apex

转载 作者:行者123 更新时间:2023-12-04 01:36:28 25 4
gpt4 key购买 nike

我所做的是按照官方 github 站点上的说明进行操作

!git clone https://github.com/NVIDIA/apex
!cd apex
!pip install -v --no-cache-dir ./

它给了我错误:
ERROR: Directory './' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 326, in run
self.name, wheel_cache
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 268, in populate_requirement_set
wheel_cache=wheel_cache
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/req/constructors.py", line 248, in install_req_from_line
"nor 'pyproject.toml' found." % name
pip._internal.exceptions.InstallationError: Directory './' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

最佳答案

(只想添加评论,但我没有足够的声誉......)

它对我有用,但 cd实际上不是必需的。另外,我需要这里建议的两个全局选项:https://github.com/NVIDIA/apex/issues/86

%%writefile setup.sh

git clone https://github.com/NVIDIA/apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./apex

那么
!sh setup.sh

关于python - 如何在 Google Colab 上安装 nvidia apex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57284345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com