GoogleColaboratory $ Path Changed

问题描述 投票:0回答:1

如何添加路径?

!export CUDA_HOME = / usr / local / cuda

!export PATH = $ PATH:$ CUDA_HOME / bin'

!. /root/.bashrc

输出:

/ bin / sh:13:/root/.bashrc:shopt:not found / bin / sh:21:/root/.bashrc:shopt:not found

ubuntu google-colaboratory
1个回答
1
投票

试试这个

import os
os.environ['PATH'] += ':/usr/local/cuda/bin'
© www.soinside.com 2019 - 2024. All rights reserved.