如何在Google Colab上安装nvidia apex [英] How to install nvidia apex on Google Colab
本文介绍了如何在Google Colab上安装nvidia apex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我所做的就是按照github官方网站上的说明进行操作
what I did is follow the instruction on the official github site
!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.
推荐答案
(希望仅添加评论,但我没有足够的声誉...)
(wanted to just add a comment but I don't have enough reputation...)
它对我有用,但实际上并不需要cd
.另外,我需要这里建议的两个全局选项: https://github.com/NVIDIA/apex /issues/86
it works for me but the cd
is actually not required. Also, I needed the two global options as suggested here: 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
这篇关于如何在Google Colab上安装nvidia apex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文