文章目录
- 1、GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
- 2、安装tree
- 3、查询GPU时无进程运行,但是显存却被占用了
- 4、VScode无法显示GUI图像
- 5、Linux中的软硬连接
- 6、VSCODE无法打开web视图,“Webview Service Worker Error in registration due to invalid document state”
- 7、切换CUDA版本
- 8、GPU对应算力
- 9、CUDA和显卡算力不匹配
- 10、pip Failed to establish a new connection: [Errno 101] 网络不可达
- 11、pip安装库报错:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
- 12、NVIDIA驱动重装导致cuda版本不匹配
- 13、ModuleNotFoundError: No module named 'pip'
- 14、conda报错"requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.bfsu.edu.cn/anaconda/cloud/menpo/noarch/current_repodata.json"
- 15、vscode找不到python解释器
- 16、conda create 环境报错
- 17. gcc版本过高
- 18. 找不到libcuda.so
1、GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
2、安装tree
conda install tree
3、查询GPU时无进程运行,但是显存却被占用了
fuser -v /dev/nvidia*
或者有管理员权限的时候
sudo fuser -v /dev/nvidia*
sudo kill -9 进程号
4、VScode无法显示GUI图像
在MobaXterm上
(base) xxx@xxx:~$ env | grep DISPLAY
DISPLAY=localhost:10.0
在VScode的终端上:
export DISPLAY=localhost:10.0
5、Linux中的软硬连接
6、VSCODE无法打开web视图,“Webview Service Worker Error in registration due to invalid document state”
关闭vscode
ctrl+R 输入 cmd ,输入以下命令;
code --no-sandbox
重启电脑
问题解决
7、切换CUDA版本
在vscode中打开.bashrc
,在最后添加CUDA版本路径:
# CUDA Soft Link
export PATH="/usr/local/cuda-10.1/bin:$PATH"
export LD_LIBRARY_PATH="/usr/lcoal/cuda-10.1/lib64:$LD_LIBRARY_PATH"
根据/usr/local/
中有的CUDA版本,就可以切换当前使用的CUDA版本
8、GPU对应算力
9、CUDA和显卡算力不匹配
修改nvvm.py:打开/anaconda3/envs/your_env/lib/python3.7/site-packages/numba/cuda/cudadrv/nvvm.py
,
# 加上1080 Ti的适配算力
def get_supported_ccs():
global _supported_cc
if _supported_cc:
return _supported_cc
try:
from numba.cuda.cudadrv.runtime import runtime
cudart_version = runtime.get_version()
except: # noqa: E722
# The CUDA Runtime may not be present
cudart_version = (0, 0)
print('cudart_version: ', cudart_version)
# cudart_version: (10, 1)
ctk_ver = f"{cudart_version[0]}.{cudart_version[1]}"
unsupported_ver = f"CUDA Toolkit {ctk_ver} is unsupported by Numba - " \
+ "10.2 is the minimum required version."
print('ctk_ver: ', ctk_ver)
# ctk_ver: 10.1
# List of supported compute capability in sorted order
if cudart_version == (0, 0):
_supported_cc = ()
# GTX 1080 Ti
elif cudart_version == (10, 1):
_supported_cc = ((3, 5), (3, 7),
(5, 0), (5, 2), (5, 3),
(6, 0), (6, 1), (6, 2),
(7, 0), (7, 2), (7, 5))
elif cudart_version == (10, 2):
_supported_cc = ((3, 5), (3, 7),
(5, 0), (5, 2), (5, 3),
(6, 0), (6, 1), (6, 2),
(7, 0), (7, 2), (7, 5))
elif cudart_version == (11, 0):
_supported_cc = ((3, 5), (3, 7),
(5, 0), (5, 2), (5, 3),
(6, 0), (6, 1), (6, 2),
(7, 0), (7, 2), (7, 5),
(8, 0))
elif cudart_version > (11, 0):
_supported_cc = ((3, 5), (3, 7),
(5, 0), (5, 2), (5, 3),
(6, 0), (6, 1), (6, 2),
(7, 0), (7, 2), (7, 5),
(8, 0), (8, 6))
elif cudart_version > (11, 4):
_supported_cc = ((3, 5), (3, 7),
(5, 0), (5, 2), (5, 3),
(6, 0), (6, 1), (6, 2),
(7, 0), (7, 2), (7, 5),
(8, 0), (8, 6), (8, 7))
else:
_supported_cc = ()
warnings.warn(unsupported_ver)
return _supported_cc
10、pip Failed to establish a new connection: [Errno 101] 网络不可达
11、pip安装库报错:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
降低pip版本:
python -m pip install pip==20.2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
12、NVIDIA驱动重装导致cuda版本不匹配
报错如下:
ImportError: libcudart.so.9.1: cannot open shared object file: No such file or directory
解决办法:
删除pip的缓存rm -r ~/.cache/pip
然后重装anaconda环境(重开)
13、ModuleNotFoundError: No module named ‘pip’
python -m ensurepip
python -m pip install --upgrade pip
14、conda报错"requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.bfsu.edu.cn/anaconda/cloud/menpo/noarch/current_repodata.json"
解决办法:恢复默认源
conda config --remove-key channels
15、vscode找不到python解释器
原因:环境中的python插件无法使用
解决办法:删掉重新安装
16、conda create 环境报错
报错时的镜像为:
default_channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
show_channel_urls yes
执行conda create -n paddle python=3.8
出现如下报错:
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/rrl/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 531, in fetch_repodata_remote_request
resp.raise_for_status()
File "/home/rrl/anaconda3/lib/python3.8/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://mirrors.bfsu.edu.cn/anaconda/pkgs/free/noarch/current_repodata.json
错误分析:在镜像网站找不到http://mirrors.bfsu.edu.cn/anaconda/pkgs/free/noarch/current_repodata.json
文件
解决办法:删除.condarc
文件中所有内容,即关闭所有镜像网站,使用默认路径
17. gcc版本过高
出现报错:error -- unsupported GNU version gcc later than 10 are not supported
解决办法
18. 找不到libcuda.so
如果在执行程序时出现如下报错:
libcuda.so.1: cannot open shared object file: No such file or directory