笔记12-远程服务器上配置linux深度学习C++环境全过程记录(笔记1和2的同样环境第3次配置)

devtools/2024/11/13 9:02:10/

笔记1和2在windows上装的同样环境在远程服务器上配置)

文章目录

    • conda create -n zgp_m3dm_main python=3.8(失败)
      • 反向代理[笔记10-linux服务器可以通过SSH连接但是没法上网](https://editor.csdn.net/md/?articleId=137644653)c off(成功)
    • conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=11.3 -c pytorch -c conda-forge失败
    • 先 conda activate zgp_m3dm_main,并反向代理
      • pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html失败
    • 离线安装pointnet2_ops_lib失败
      • 查看cudu
      • 重新安装(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 -i https://pypi.tuna.tsinghua.edu.cn/simple
      • 仍然 OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. 似乎缺少CUDA Toolkit
      • 补充cudatoolkit(失败)
    • vim ~/.bashrc
      • 切换环境再次安装,pkgs里面的是缓存没用的:
      • 再次安装,找不到torch
      • 发现自动回退base环境了,激活虚拟环境再次安装,
      • 重新连接 SSH,再次安装,这样把设置错的变量忘了
  • 安装CUDA11.3[官网](https://developer.nvidia.com/cuda-11-3-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=CentOS&target_version=7&target_type=rpm_local) (有用)
      • 激活的虚拟环境中,执行安装命令sudo sh /home/cszx/zgp/M3DM_RGB_PC/cuda_11.3.1_465.19.01_linux.run(有用)
        • 改环境变量(有用)
      • 尝试安装一个合适的g++(失败)
    • 尝试(失败)
        • 修改为sudo yum install gcc-9 gcc-9--multilib g++-9 g++-9--multilib(失败)
      • 利用conda下载conda install -c moussi gcc_impl_linux-64=8.4.0(有用)
      • 安装相同的g++ conda install -c moussi gxx_impl_linux-64=8.4.0(有用)
        • 建立软连接,并设置环境变量(有用)
        • 再次建立软连接(有用)
      • 安装python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/KNN_CUDA-0.2-py3-none-any.whl
        • python3 -m pip install -r /。。。/requirements.txt
  • ModuleNotFoundError: No module named 'matplotlib'
        • 彻底编辑环境变量
      • RuntimeError: Ninja is required to load C++ extensions
      • sudo yum install ninja-build(失败)
      • 重设置环境变量
      • 再次安装ninja(成功)
      • 环境变量写入刷新,再次安装,再次粘贴到/home/cszx/miniconda3/envs/zgp_m3dm_main/bin
        • 发现在命令行中运行就好了,大概是因为库的名字写对了(成功)
      • 继续安装 pip install pandas(成功)

conda create -n zgp_m3dm_main python=3.8(失败)


CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/repodata.json>
Elapsed: -

反向代理笔记10-linux服务器可以通过SSH连接但是没法上网c off(成功)

在这里插入图片描述

conda install pytorch1.9.0 torchvision0.10.0 torchaudio==0.9.0 cudatoolkit=11.3 -c pytorch -c conda-forge失败

卡住,可能是找不到依赖关系的解决方案
在这里插入图片描述

先 conda activate zgp_m3dm_main,并反向代理

pip install torch1.9.0+cu111 torchvision0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html失败

(zgp_m3dm_main) ~/PySocks (master ✔) pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.9.0+cu111Downloading https://download.pytorch.org/whl/cu111/torch-1.9.0%2Bcu111-cp38-cp38-linux_x86_64.whl (2041.3 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 GB 778.2 kB/s eta 0:00:00
Collecting torchvision==0.10.0+cu111Downloading https://download.pytorch.org/whl/cu111/torchvision-0.10.0%2Bcu111-cp38-cp38-linux_x86_64.whl (23.2 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.2/23.2 MB 2.9 MB/s eta 0:00:00
Collecting torchaudio==0.9.0Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7f/02/3e09a1873dedd59ed1a513a38940781dbbd2797e6d385ff8836fcee9928e/torchaudio-0.9.0-cp38-cp38-manylinux1_x86_64.whl (1.9 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 2.2 MB/s eta 0:00:00
Collecting typing-extensions (from torch==1.9.0+cu111)Downloading https://pypi.tuna.tsinghua.edu.cn/packages/01/f3/936e209267d6ef7510322191003885de524fc48d1b43269810cd589ceaf5/typing_extensions-4.11.0-py3-none-any.whl (34 kB)
Collecting numpy (from torchvision==0.10.0+cu111)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/98/5d/5738903efe0ecb73e51eb44feafba32bdba2081263d40c5043568ff60faf/numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting pillow>=5.3.0 (from torchvision==0.10.0+cu111)Downloading https://pypi.tuna.tsinghua.edu.cn/packages/45/8c/ea6fdce74c963d7017f02708b7e4918a401200844ac2c4af1cef8ebc8823/pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 3.1 MB/s eta 0:00:00
Installing collected packages: typing-extensions, pillow, numpy, torch, torchvision, torchaudio
Successfully installed numpy-1.24.4 pillow-10.3.0 torch-1.9.0+cu111 torchaudio-0.9.0 torchvision-0.10.0+cu111 typing-extensions-4.11.0

离线安装pointnet2_ops_lib失败

      OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed× Encountered error while generating package metadata.
╰─> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

查看cudu

(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib pip list
Package Version


numpy 1.24.4
pillow 10.3.0
pip 23.3.1
PySocks 1.7.1
setuptools 68.2.2
torch 1.9.0+cu111
torchaudio 0.9.0
torchvision 0.10.0+cu111
typing_extensions 4.11.0
wheel 0.41.2

重新安装(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib pip install torch1.12.1+cu113 torchvision0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 -i https://pypi.tuna.tsinghua.edu.cn/simple

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://download.pytorch.org/whl/cu113
Collecting torch==1.12.1+cu113Using cached https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp38-cp38-linux_x86_64.whl (1837.7 MB)
Collecting torchvision==0.13.1+cu113Using cached https://download.pytorch.org/whl/cu113/torchvision-0.13.1%2Bcu113-cp38-cp38-linux_x86_64.whl (23.4 MB)
Collecting torchaudio==0.12.1Using cached https://download.pytorch.org/whl/cu113/torchaudio-0.12.1%2Bcu113-cp38-cp38-linux_x86_64.whl (3.8 MB)
Requirement already satisfied: typing-extensions in /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from torch==1.12.1+cu113) (4.11.0)
Requirement already satisfied: numpy in /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from torchvision==0.13.1+cu113) (1.24.4)
Collecting requests (from torchvision==0.13.1+cu113)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl (62 kB)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from torchvision==0.13.1+cu113) (10.3.0)
Collecting charset-normalizer<4,>=2 (from requests->torchvision==0.13.1+cu113)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3d/09/d82fe4a34c5f0585f9ea1df090e2a71eb9bb1e469723053e1ee9f57c16f3/charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)
Collecting idna<4,>=2.5 (from requests->torchvision==0.13.1+cu113)Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl (66 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 2.7 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1 (from requests->torchvision==0.13.1+cu113)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl (121 kB)
Collecting certifi>=2017.4.17 (from requests->torchvision==0.13.1+cu113)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ba/06/a07f096c664aeb9f01624f858c3add0a4e913d6c96257acb4fce61e7de14/certifi-2024.2.2-py3-none-any.whl (163 kB)
Installing collected packages: urllib3, torch, idna, charset-normalizer, certifi, torchaudio, requests, torchvisionAttempting uninstall: torchFound existing installation: torch 1.9.0+cu111Uninstalling torch-1.9.0+cu111:Successfully uninstalled torch-1.9.0+cu111Attempting uninstall: torchaudioFound existing installation: torchaudio 0.9.0Uninstalling torchaudio-0.9.0:Successfully uninstalled torchaudio-0.9.0Attempting uninstall: torchvisionFound existing installation: torchvision 0.10.0+cu111Uninstalling torchvision-0.10.0+cu111:Successfully uninstalled torchvision-0.10.0+cu111
Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 idna-3.7 requests-2.31.0 torch-1.12.1+cu113 torchaudio-0.12.1+cu113 torchvision-0.13.1+cu113 urllib3-2.2.1
Package            Version
------------------ ------------
certifi            2024.2.2
charset-normalizer 3.3.2
idna               3.7
numpy              1.24.4
pillow             10.3.0
pip                23.3.1
PySocks            1.7.1
requests           2.31.0
setuptools         68.2.2
torch              1.12.1+cu113
torchaudio         0.12.1+cu113
torchvision        0.13.1+cu113
typing_extensions  4.11.0
urllib3            2.2.1
wheel              0.41.2
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib conda list                  
# packages in environment at /home/cszx/miniconda3/envs/zgp_m3dm_main:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
ca-certificates           2024.3.11            h06a4308_0  
certifi                   2024.2.2                 pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
idna                      3.7                      pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libstdcxx-ng              11.2.0               h1234567_1  
ncurses                   6.4                  h6a678d5_0  
numpy                     1.24.4                   pypi_0    pypi
openssl                   3.0.13               h7f8727e_0  
pillow                    10.3.0                   pypi_0    pypi
pip                       23.3.1           py38h06a4308_0  
python                    3.8.19               h955ad1f_0  
readline                  8.2                  h5eee18b_0  
requests                  2.31.0                   pypi_0    pypi
setuptools                68.2.2           py38h06a4308_0  
sqlite                    3.41.2               h5eee18b_0  
tk                        8.6.12               h1ccaba5_0  
torch                     1.12.1+cu113             pypi_0    pypi
torchaudio                0.12.1+cu113             pypi_0    pypi
torchvision               0.13.1+cu113             pypi_0    pypi
typing-extensions         4.11.0                   pypi_0    pypi
urllib3                   2.2.1                    pypi_0    pypi
wheel                     0.41.2           py38h06a4308_0  
xz                        5.4.6                h5eee18b_0  
zlib                      1.2.13               h5eee18b_0  

仍然 OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. 似乎缺少CUDA Toolkit

补充cudatoolkit(失败)

conda install cudatoolkit=11.3
在这里插入图片描述
再次python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib
仍然报错

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_libPreparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [12 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib/setup.py", line 27, in <module>CUDAExtension(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 983, in CUDAExtensionlibrary_dirs += library_paths(cuda=True)File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1098, in library_pathsif (not os.path.exists(_join_cuda_home(lib_dir)) andFile "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2125, in _join_cuda_homeraise EnvironmentError('CUDA_HOME environment variable is not set. 'OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed× Encountered error while generating package metadata.
╰─> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

在这里插入图片描述

(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib which nvcc
/usr/bin/which: no nvcc in (/home/cszx/utils/gcc/bin:/home/cszx/miniconda3/envs/zgp_m3dm_main/bin:/home/cszx/miniconda3/condabin:/usr/local/bin:/usr/bin:/home/cszx/bin:/usr/local/sbin:/usr/sbin:/usr/local/ssl/bin)
sudo find / -name nvcc
[sudo] password for cszx: 
/home/cszx/miniconda3/pkgs/cuda-nvcc-11.6.124-hbba6d2d_0/bin/nvcc

vim ~/.bashrc

在这里插入图片描述
移动到文件末尾
G
o插入行
export CUDA_HOME=$CUDA_HOME:/home/cszx/miniconda3/pkgs/cuda-11.6.1-0
·```
source ~/.bashrc
/etc/bashrc:37: command not found: shopt

(base) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib echo $0
-zsh

在这里插入图片描述
source ~/.zshrc
还是不行,找不到torch
在这里插入图片描述

切换环境再次安装,pkgs里面的是缓存没用的:

在这里插入图片描述
vim ~/.zshrc
向上/下移动一行k 或 j
dd删掉这一行
保存退出:wq
source ~/.zshrc

再次安装,找不到torch

在这里插入图片描述

发现自动回退base环境了,激活虚拟环境再次安装,

在这里插入图片描述

将vim ~/.bashrc 的CUDA变量也删掉,
在这里插入图片描述
source
激活虚拟环境,再次安装
还是

      error: [Errno 2] No such file or directory: ':/home/cszx/miniconda3/pkgs/cuda-11.6.1-0:/home/cszx/miniconda3/pkgs/cuda-11.6.1-0/bin/nvcc'[end of output]

重新连接 SSH,再次安装,这样把设置错的变量忘了

(zgp_m3dm_main) ~ python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_libPreparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [12 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib/setup.py", line 27, in <module>CUDAExtension(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 983, in CUDAExtensionlibrary_dirs += library_paths(cuda=True)File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1098, in library_pathsif (not os.path.exists(_join_cuda_home(lib_dir)) andFile "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2125, in _join_cuda_homeraise EnvironmentError('CUDA_HOME environment variable is not set. 'OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

安装CUDA11.3官网 (有用)

选择与系统对应的,比如
在这里插入图片描述

尝试第三种安装,但是手动下载保存,上传服务器
在这里插入图片描述
在这里插入图片描述

linuxrun_287">激活的虚拟环境中,执行安装命令sudo sh /home/cszx/zgp/M3DM_RGB_PC/cuda_11.3.1_465.19.01_linux.run(有用)

在这里插入图片描述
在这里插入图片描述
sudo sh /home/cszx/zgp/M3DM_RGB_PC/cuda_11.3.1_465.19.01_linux.run
[sudo] password for cszx:
Installation failed. See log at /var/log/cuda-installer.log for details.
参考基于linux系统下对conda虚拟环境中cuda和cudnn的安装(服务器无权限修改cuda版本的情况),
在这里插入图片描述
用上下键移动,空格取消
在这里插入图片描述

下,进入toolkit
在这里插入图片描述

在这里插入图片描述
我没改路径
│ /usr/local/cuda-11.3/
似乎成功了,

Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-11.3/
Samples:  Installed in /home/cszx/, but missing recommended librariesPlease make sure that-   PATH includes /usr/local/cuda-11.3/bin-   LD_LIBRARY_PATH includes /usr/local/cuda-11.3/lib64, or, add /usr/local/cuda-11.3/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.3/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 465.00 is required for CUDA 11.3 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:sudo <CudaInstaller>.run --silent --driverLogfile is /var/log/cuda-installer.log

加入环境变量(写错了)

export CUDA_HOME= C U D A H O M E : / u s r / l o c a l / c u d a − 11.3 ! [ 在这里插入图片描述 ] ( h t t p s : / / i m g − b l o g . c s d n i m g . c n / d i r e c t / e 8 a d 4 b 609 f 9847678 f c d d 0 b 5 f 1 c 26 e 25. p n g ) ! [ 在这里插入图片描述 ] ( h t t p s : / / i m g − b l o g . c s d n i m g . c n / d i r e c t / c 2 f d f 79 d 9 a 8 b 4 f 85 b 676 a c e d b f 187 e 63. p n g ) 再次激活安装 e r r o r : [ E r r n o 2 ] N o s u c h f i l e o r d i r e c t o r y : ′ : / u s r / l o c a l / c u d a − 11.3 / b i n / n v c c ′ 似乎不能有冒号修改环境变量删除字符 x e x p o r t C U D A H O M E = CUDA_HOME:/usr/local/cuda-11.3 ![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/e8ad4b609f9847678fcdd0b5f1c26e25.png) ![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/c2fdf79d9a8b4f85b676acedbf187e63.png) 再次激活安装 error: [Errno 2] No such file or directory: ':/usr/local/cuda-11.3/bin/nvcc' 似乎不能有冒号 修改环境变量 删除字符x export CUDA_HOME= CUDAHOME:/usr/local/cuda11.3![在这里插入图片描述](https://imgblog.csdnimg.cn/direct/e8ad4b609f9847678fcdd0b5f1c26e25.png)![在这里插入图片描述](https://imgblog.csdnimg.cn/direct/c2fdf79d9a8b4f85b676acedbf187e63.png)再次激活安装error:[Errno2]Nosuchfileordirectory::/usr/local/cuda11.3/bin/nvcc似乎不能有冒号修改环境变量删除字符xexportCUDAHOME=CUDA_HOME/usr/local/cuda-11.3
在这里插入图片描述
再次激活安装
在这里插入图片描述
还是

      error: [Errno 2] No such file or directory: ':/usr/local/cuda-11.3/usr/local/cuda-11.3/bin/nvcc'[end of output]
改环境变量(有用)
  RuntimeError: The current installed version of g++ (10.5.0) is greater than the maximum required version by CUDA 11.3 (10.0.0). Please make sure to use an adequate version of g++ (>=5.0.0, <=10.0.0).[end of output]

似乎可以了,但是g++又不行

尝试安装一个合适的g++(失败)

Linux操作系统(三):详解Linux及2023年gcc/g++ 多版本间切换
sudo yum install centos-release-scl

Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock: (28, 'Resolving timed out after 30541 milliseconds')
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl.noarch 0:2-3.el7.centos will be installed
--> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-3.el7.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-3.el7.centos will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================================================================================================================================================================================Package                                                          Arch                                              Version                                                     Repository                                         Size
========================================================================================================================================================================================================================================
Installing:centos-release-scl                                               noarch                                            2-3.el7.centos                                              extras                                             12 k
Installing for dependencies:centos-release-scl-rh                                            noarch                                            2-3.el7.centos                                              extras                                             12 kTransaction Summary
========================================================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)Total download size: 24 k
Installed size: 39 k
Is this ok [y/d/N]: Exiting on user command
Your transaction was saved, rerun it with:yum load-transaction /tmp/yum_save_tx.2024-04-19.23-44.XE1jat.yumtx

在这里插入图片描述

 Current download cancelled, interrupt (ctrl-c) again within two seconds
to exit.
--> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-3.el7.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-3.el7.centos will be installed
--> Finished Dependency ResolutionDependencies Resolved=========================================================================================Package                      Arch          Version                  Repository     Size
=========================================================================================
Installing:centos-release-scl           noarch        2-3.el7.centos           extras         12 k
Installing for dependencies:centos-release-scl-rh        noarch        2-3.el7.centos           extras         12 kTransaction Summary
=========================================================================================
Install  1 Package (+1 Dependent package)Total download size: 24 k
Installed size: 39 k
Is this ok [y/d/N]: y
Downloading packages:
centos-release-scl-2-3.el7.cen FAILED                                          
http://mirrors.ustc.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.ustc.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-rh-2-3.el7. FAILED                                          
http://mirrors.ustc.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.ustc.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-2-3.el7.cen FAILED                                          
http://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-rh-2-3.el7. FAILED                                          
http://mirrors.qlu.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.qlu.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-2-3.el7.cen FAILED                                          
http://mirrors.huaweicloud.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.huaweicloud.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-rh-2-3.el7. FAILED                                          
http://mirrors.163.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.163.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-2-3.el7.cen FAILED                                          
http://mirrors.aliyun.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
centos-release-scl-rh-2-3.el7. FAILED                                          
http://mirrors.bfsu.edu.cn/centos/7.9.2009/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm: [Errno 12] Timeout on h
Trying other mirror.

反向代理再次sudo yum install centos-release-scl
还是装不上,尝试下一个命令
sudo yum install devtoolset-9
在这里插入图片描述

http://mirrors.bupt.edu.cn/centos/7.9.2009/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.bupt.edu.cn/centos/7.9.2009/updates/x86_64/repodata/repomd.xml: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
No package devtoolset-9 available.
Error: Nothing to do

不行

尝试(失败)

linux命令查看g 版本,linux下gcc、g++不同版本的安装和切换

(zgp_m3dm_main) ~ sudo apt install gcc-9 gcc-9--multilib g++-9 g++-9--multilib
sudo: apt: command not found
(zgp_m3dm_main) ~ 
修改为sudo yum install gcc-9 gcc-9–multilib g+±9 g+±9–multilib(失败)

估计还是网络问题,而且测试发现conda是可以的,yum不可以

linux64840_462">利用conda下载conda install -c moussi gcc_impl_linux-64=8.4.0(有用)

Linux系统 利用conda更改gcc、g++版本(非root用户)
conda install -c moussi gcc_impl_linux-64=8.4.0

The following NEW packages will be INSTALLED:_sysroot_linux-64~ pkgs/main/noarch::_sysroot_linux-64_curr_repodata_hack-3-haa98f57_10 binutils_impl_lin~ pkgs/main/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1 gcc_impl_linux-64  pkgs/main/linux-64::gcc_impl_linux-64-8.4.0-he7ac559_17 kernel-headers_li~ pkgs/main/noarch::kernel-headers_linux-64-3.10.0-h57e8cba_10 libgcc-devel_linu~ pkgs/main/linux-64::libgcc-devel_linux-64-8.4.0-hd257e2f_17 sysroot_linux-64   pkgs/main/noarch::sysroot_linux-64-2.17-h57e8cba_10 Proceed ([y]/n)? yDownloading and Extracting Packages:Preparing transaction: done                                                                                                                                                                                                             
Verifying transaction: done                                                                                                                                                                                                             
Executing transaction: done  
(zgp_m3dm_main) ~ gcc -v
Using built-in specs.                                                                                                                                                                                                                   
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/cszx/utils/gcc/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.5.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/cszx/gcc --enable-threads=posix -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.5.0 (GCC) 
(zgp_m3dm_main) ~ g++ --version
g++ (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

linux64840_500">安装相同的g++ conda install -c moussi gxx_impl_linux-64=8.4.0(有用)

The following NEW packages will be INSTALLED:gxx_impl_linux-64  pkgs/main/linux-64::gxx_impl_linux-64-8.4.0-h9ce2e92_17 libstdcxx-devel_l~ pkgs/main/linux-64::libstdcxx-devel_linux-64-8.4.0-hf0c5c8d_17 Proceed ([y]/n)? yDownloading and Extracting Packages:Preparing transaction: done                                                                                                                                                                                                             
Verifying transaction: done
Executing transaction: done

再次查看版本,没变

(zgp_m3dm_main) ~ g++ --version                                  
g++ (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.(zgp_m3dm_main) ~ gcc --version
gcc (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
建立软连接,并设置环境变量(有用)
(zgp_m3dm_main) ~ bin=`/home/cszx/miniconda3/envs/zgp_m3dm_main/bin`                                                                                       
(zgp_m3dm_main) ~ ln -s ${bin}/x86_64-conda-linux-gnu-cc ${bin}/gcc
ln: failed to create symbolic link ‘/gcc’: Permission denied
(zgp_m3dm_main) ~ sudo ln -s ${bin}/x86_64-conda-linux-gnu-cc ${bin}/gcc
[sudo] password for cszx: 
(zgp_m3dm_main) ~ sudo ln -s ${bin}/x86_64-conda-linux-gnu-c++ ${bin}/g++                                          
(zgp_m3dm_main) ~ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/cszx/utils/gcc/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.5.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/cszx/gcc --enable-threads=posix -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.5.0 (GCC) 
(zgp_m3dm_main) ~ export PATH=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin:$PATH
(zgp_m3dm_main) ~ gcc -v                                                        
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/cszx/utils/gcc/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.5.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/cszx/gcc --enable-threads=posix -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.5.0 (GCC) 
(zgp_m3dm_main) ~ export PATH=/home/cszx/miniconda3/envs/zgp_m3dm_main/lib:$PATH
(zgp_m3dm_main) ~ gcc -v                                                        
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/cszx/utils/gcc/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.5.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/cszx/gcc --enable-threads=posix -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.5.0 (GCC) 
(zgp_m3dm_main) ~ g++ --version                                                                                                                            
g++ (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

用不同名称查询的版本号不同,应是软连接没建立成功

(zgp_m3dm_main) ~ x86_64-conda-linux-gnu-cc -v
Reading specs from /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/../lib/gcc/x86_64-conda-linux-gnu/8.4.0/specs
COLLECT_GCC=x86_64-conda-linux-gnu-cc
COLLECT_LTO_WRAPPER=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/../libexec/gcc/x86_64-conda-linux-gnu/8.4.0/lto-wrapper
Target: x86_64-conda-linux-gnu
Configured with: /home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda-linux-gnu --prefix=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built --with-sysroot=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.24.0.133_b0863d8_dirty' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpfr=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpc=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-isl=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 8.4.0 (crosstool-NG 1.24.0.133_b0863d8_dirty) 
(zgp_m3dm_main) ~ x86_64-conda-linux-gnu-c++ -v
Reading specs from /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/../lib/gcc/x86_64-conda-linux-gnu/8.4.0/specs
COLLECT_GCC=x86_64-conda-linux-gnu-c++
COLLECT_LTO_WRAPPER=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/../libexec/gcc/x86_64-conda-linux-gnu/8.4.0/lto-wrapper
Target: x86_64-conda-linux-gnu
Configured with: /home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda-linux-gnu --prefix=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built --with-sysroot=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.24.0.133_b0863d8_dirty' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpfr=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpc=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --with-isl=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/.build/x86_64-conda-linux-gnu/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/builder/ktietz/cos6/ci_cos6/ctng-compilers_1622658800915/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 8.4.0 (crosstool-NG 1.24.0.133_b0863d8_dirty) 
再次建立软连接(有用)

ln -s /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/x86_64-conda-linux-gnu-cc /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/gcc
ln -s /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/x86_64-conda-linux-gnu-c++ /home/cszx/miniconda3/envs/zgp_m3dm_main/bin/g++
还是一样

(zgp_m3dm_main) ~ g++ --version                                                                                                                  
g++ (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.(zgp_m3dm_main) ~ gcc --version                                                                                                                
gcc (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

查看gcc位置,pycharm与xshell返回的不相同,是临时设置了环境变量的原因

(zgp_m3dm_main) ~ which gcc                                                                                                      
~/utils/gcc/bin/gcc
(zgp_m3dm_main) ~ which g++
~/utils/gcc/bin/g++
(zgp_m3dm_main) ~ (zgp_m3dm_main) ~ which gcc                                                                                                      
~/miniconda3/envs/zgp_m3dm_main/bin/gcc
(zgp_m3dm_main) ~ which g++
~/miniconda3/envs/zgp_m3dm_main/bin/g++
(zgp_m3dm_main) ~ gcc --version
gcc (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

但是输出的版本都还是原来的,
不过能用了(虽然不理解)

(zgp_m3dm_main) ~ python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_lib
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/Pointnet2_PyTorch-master/Pointnet2_PyTorch-master/pointnet2_ops_libPreparing metadata (setup.py) ... done
Requirement already satisfied: torch>=1.4 in ./miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from pointnet2-ops==3.0.0) (1.12.1+cu113)
Requirement already satisfied: typing-extensions in ./miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from torch>=1.4->pointnet2-ops==3.0.0) (4.11.0)
Building wheels for collected packages: pointnet2-opsBuilding wheel for pointnet2-ops (setup.py) ... doneCreated wheel for pointnet2-ops: filename=pointnet2_ops-3.0.0-cp38-cp38-linux_x86_64.whl size=6215366 sha256=e9acb26c148adf8da3365ab14e9fd84394574fc78507ca5f3a8e59a6f1c0035dStored in directory: /tmp/pip-ephem-wheel-cache-tkiie_g4/wheels/26/80/3b/21b76c5f162d5192b501a15b4aa0ef2d24762a6b1479665e18
Successfully built pointnet2-ops
Installing collected packages: pointnet2-ops
Successfully installed pointnet2-ops-3.0.0

安装python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/KNN_CUDA-0.2-py3-none-any.whl

(zgp_m3dm_main) ~ python3 -m pip install /home/cszx/zgp/M3DM_RGB_PC/KNN_CUDA-0.2-py3-none-any.whl
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./zgp/M3DM_RGB_PC/KNN_CUDA-0.2-py3-none-any.whl
Requirement already satisfied: numpy in ./miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from KNN-CUDA==0.2) (1.24.4)
Collecting scikit-learn (from KNN-CUDA==0.2)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3f/48/6fdd99f5717045f9984616b5c2ec683d6286d30c0ac234563062132b83ab/scikit_learn-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.1 MB)
Requirement already satisfied: torch>=1.1.0 in ./miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from KNN-CUDA==0.2) (1.12.1+cu113)
Requirement already satisfied: typing-extensions in ./miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages (from torch>=1.1.0->KNN-CUDA==0.2) (4.11.0)
Collecting scipy>=1.5.0 (from scikit-learn->KNN-CUDA==0.2)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/69/f0/fb07a9548e48b687b8bf2fa81d71aba9cfc548d365046ca1c791e24db99d/scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
Collecting joblib>=1.1.1 (from scikit-learn->KNN-CUDA==0.2)Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ae/e2/4dea6313ef2b38442fccbbaf4017e50a6c3c8a50e8ee9b512783e5c90409/joblib-1.4.0-py3-none-any.whl (301 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 301.2/301.2 kB 3.2 MB/s eta 0:00:00
Collecting threadpoolctl>=2.0.0 (from scikit-learn->KNN-CUDA==0.2)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/84/ccd9b08653022b7785b6e3ee070ffb2825841e0dc119be22f0840b2b35cb/threadpoolctl-3.4.0-py3-none-any.whl (17 kB)
Installing collected packages: threadpoolctl, scipy, joblib, scikit-learn, KNN-CUDA
Successfully installed KNN-CUDA-0.2 joblib-1.4.0 scikit-learn-1.3.2 scipy-1.10.1 threadpoolctl-3.4.0
python3 -m pip install -r /。。。/requirements.txt
Building wheels for collected packages: wgetBuilding wheel for wget (setup.py) ... doneCreated wheel for wget: filename=wget-3.2-py3-none-any.whl size=9655 sha256=81928f3c43dda748ad9642fdcebb1f5d01eeb96c4e02e698e80dec4cfd47edc7Stored in directory: /home/cszx/.cache/pip/wheels/df/d8/7c/a62984d928c4d9d2d2abe86ae3bd091679cfc87bf6709256df
Successfully built wget
Installing collected packages: wget, zipp, tqdm, tifffile, tensorboard-data-server, setuptools, safetensors, pyyaml, PyWavelets, pyasn1, protobuf, packaging, opencv-python, oauthlib, networkx, MarkupSafe, imageio, grpcio, fsspec, filelock, cachetools, absl-py, werkzeug, rsa, requests-oauthlib, pyasn1-modules, lazy_loader, kornia, importlib-metadata, huggingface_hub, timm, scikit-image, markdown, google-auth, google-auth-oauthlib, tensorboardAttempting uninstall: setuptoolsFound existing installation: setuptools 68.2.2Uninstalling setuptools-68.2.2:Successfully uninstalled setuptools-68.2.2
Successfully installed MarkupSafe-2.1.5 PyWavelets-1.4.1 absl-py-2.1.0 cachetools-5.3.3 filelock-3.13.4 fsspec-2024.3.1 google-auth-2.29.0 google-auth-oauthlib-1.0.0 grpcio-1.62.2 huggingface_hub-0.22.2 imageio-2.34.1 importlib-metadata-7.1.0 kornia-0.5.3 lazy_loader-0.4 markdown-3.6 networkx-3.1 oauthlib-3.2.2 opencv-python-4.9.0.80 packaging-24.0 protobuf-5.26.1 pyasn1-0.6.0 pyasn1-modules-0.4.0 pyyaml-6.0.1 requests-oauthlib-2.0.0 rsa-4.9 safetensors-0.4.3 scikit-image-0.21.0 setuptools-59.5.0 tensorboard-2.14.0 tensorboard-data-server-0.7.2 tifffile-2023.7.10 timm-0.9.16 tqdm-4.66.2 werkzeug-3.0.2 wget-3.2 zipp-3.18.1

ModuleNotFoundError: No module named ‘matplotlib’

conda install matplotlib

The following NEW packages will be INSTALLED:blas               pkgs/main/linux-64::blas-1.0-mkl brotli             pkgs/main/linux-64::brotli-1.0.9-h5eee18b_7 brotli-bin         pkgs/main/linux-64::brotli-bin-1.0.9-h5eee18b_7 bzip2              pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_5 contourpy          pkgs/main/linux-64::contourpy-1.0.5-py38hdb19cb5_0 cycler             pkgs/main/noarch::cycler-0.11.0-pyhd3eb1b0_0 cyrus-sasl         pkgs/main/linux-64::cyrus-sasl-2.1.28-h52b45da_1 dbus               pkgs/main/linux-64::dbus-1.13.18-hb2f20db_0 expat              pkgs/main/linux-64::expat-2.6.2-h6a678d5_0 fontconfig         pkgs/main/linux-64::fontconfig-2.14.1-h4c34cd2_2 fonttools          pkgs/main/linux-64::fonttools-4.51.0-py38h5eee18b_0 freetype           pkgs/main/linux-64::freetype-2.12.1-h4a9f257_0 glib               pkgs/main/linux-64::glib-2.78.4-h6a678d5_0 glib-tools         pkgs/main/linux-64::glib-tools-2.78.4-h6a678d5_0 gst-plugins-base   pkgs/main/linux-64::gst-plugins-base-1.14.1-h6a678d5_1 gstreamer          pkgs/main/linux-64::gstreamer-1.14.1-h5eee18b_1 icu                pkgs/main/linux-64::icu-73.1-h6a678d5_0 importlib_resourc~ pkgs/main/linux-64::importlib_resources-6.1.1-py38h06a4308_1 intel-openmp       pkgs/main/linux-64::intel-openmp-2023.1.0-hdb19cb5_46306 jpeg               pkgs/main/linux-64::jpeg-9e-h5eee18b_1 kiwisolver         pkgs/main/linux-64::kiwisolver-1.4.4-py38h6a678d5_0 krb5               pkgs/main/linux-64::krb5-1.20.1-h143b758_1 lcms2              pkgs/main/linux-64::lcms2-2.12-h3be6417_0 lerc               pkgs/main/linux-64::lerc-3.0-h295c915_0 libbrotlicommon    pkgs/main/linux-64::libbrotlicommon-1.0.9-h5eee18b_7 libbrotlidec       pkgs/main/linux-64::libbrotlidec-1.0.9-h5eee18b_7 libbrotlienc       pkgs/main/linux-64::libbrotlienc-1.0.9-h5eee18b_7 libclang           pkgs/main/linux-64::libclang-14.0.6-default_hc6dbbc7_1 libclang13         pkgs/main/linux-64::libclang13-14.0.6-default_he11475f_1 libcups            pkgs/main/linux-64::libcups-2.4.2-h2d74bed_1 libdeflate         pkgs/main/linux-64::libdeflate-1.17-h5eee18b_1 libedit            pkgs/main/linux-64::libedit-3.1.20230828-h5eee18b_0 libglib            pkgs/main/linux-64::libglib-2.78.4-hdc74915_0 libiconv           pkgs/main/linux-64::libiconv-1.16-h7f8727e_2 libllvm14          pkgs/main/linux-64::libllvm14-14.0.6-hdb19cb5_3 libpng             pkgs/main/linux-64::libpng-1.6.39-h5eee18b_0 libpq              pkgs/main/linux-64::libpq-12.17-hdbd6064_0 libtiff            pkgs/main/linux-64::libtiff-4.5.1-h6a678d5_0 libuuid            pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 libwebp-base       pkgs/main/linux-64::libwebp-base-1.3.2-h5eee18b_0 libxcb             pkgs/main/linux-64::libxcb-1.15-h7f8727e_0 libxkbcommon       pkgs/main/linux-64::libxkbcommon-1.0.1-h5eee18b_1 libxml2            pkgs/main/linux-64::libxml2-2.10.4-hfdd30dd_2 lz4-c              pkgs/main/linux-64::lz4-c-1.9.4-h6a678d5_0 matplotlib         pkgs/main/linux-64::matplotlib-3.7.2-py38h06a4308_0 matplotlib-base    pkgs/main/linux-64::matplotlib-base-3.7.2-py38h1128e8f_0 mkl                pkgs/main/linux-64::mkl-2023.1.0-h213fc3f_46344 mkl-service        pkgs/main/linux-64::mkl-service-2.4.0-py38h5eee18b_1 mkl_fft            pkgs/main/linux-64::mkl_fft-1.3.8-py38h5eee18b_0 mkl_random         pkgs/main/linux-64::mkl_random-1.2.4-py38hdb19cb5_0 mysql              pkgs/main/linux-64::mysql-5.7.24-h721c034_2 numpy              pkgs/main/linux-64::numpy-1.24.3-py38hf6e8229_1 numpy-base         pkgs/main/linux-64::numpy-base-1.24.3-py38h060ed82_1 openjpeg           pkgs/main/linux-64::openjpeg-2.4.0-h3ad879b_0 packaging          pkgs/main/linux-64::packaging-23.2-py38h06a4308_0 pcre2              pkgs/main/linux-64::pcre2-10.42-hebb0a14_0 pillow             pkgs/main/linux-64::pillow-10.2.0-py38h5eee18b_0 ply                pkgs/main/linux-64::ply-3.11-py38_0 pyparsing          pkgs/main/linux-64::pyparsing-3.0.9-py38h06a4308_0 pyqt               pkgs/main/linux-64::pyqt-5.15.10-py38h6a678d5_0 pyqt5-sip          pkgs/main/linux-64::pyqt5-sip-12.13.0-py38h5eee18b_0 python-dateutil    pkgs/main/noarch::python-dateutil-2.8.2-pyhd3eb1b0_0 qt-main            pkgs/main/linux-64::qt-main-5.15.2-h53bd1ea_10 sip                pkgs/main/linux-64::sip-6.7.12-py38h6a678d5_0 six                pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1 tbb                pkgs/main/linux-64::tbb-2021.8.0-hdb19cb5_0 tomli              pkgs/main/linux-64::tomli-2.0.1-py38h06a4308_0 tornado            pkgs/main/linux-64::tornado-6.3.3-py38h5eee18b_0 unicodedata2       pkgs/main/linux-64::unicodedata2-15.1.0-py38h5eee18b_0 zipp               pkgs/main/linux-64::zipp-3.17.0-py38h06a4308_0 zstd               pkgs/main/linux-64::zstd-1.5.5-hc292b87_0 Proceed ([y]/n)? yDownloading and Extracting Packages:Preparing transaction: done                                                                                                                                                                                                             
Verifying transaction: done                                                                                                                                                                                                             
Executing transaction: done    
彻底编辑环境变量

vim ~/.zshrc
添加
export PATH=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin:/home/cszx/miniconda3/envs/zgp_m3dm_main/lib:$PATH
(zgp_m3dm_main) ~ source ~/.zshrc
(base) ~ conda activate zgp_m3dm_main

RuntimeError: Ninja is required to load C++ extensions

zsh: permission denied: /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master/configure.py
没有权限
sudo /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master/configure.py
sudo: /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master/configure.py: command not found
参考文献sudo: ./configure: command not found

(zgp_m3dm_main) ~ cd /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master/                                
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master ./configure.py --bootstrap
zsh: permission denied: ./configure.py
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master sudo ./configure.py --bootstrap
sudo: ./configure.py: command not found
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master chmod 755 configure.py            
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master sudo ./configure.py --bootstrap     
[sudo] password for cszx: 
bootstrapping ninja...
/bin/sh: ./src/inline.sh: Permission denied
when running:  "./src/inline.sh" kBrowsePy < ./src/browse.py > build/browse_py.h
Traceback (most recent call last):File "./configure.py", line 477, in <module>variables=[('varname', 'kBrowsePy')])File "./configure.py", line 166, in buildself._run_command(self._expand(cmd, local_vars))File "./configure.py", line 191, in _run_commandsubprocess.check_call(cmdline, shell=True)File "/usr/lib64/python3.6/subprocess.py", line 311, in check_callraise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '"./src/inline.sh" kBrowsePy < ./src/browse.py > build/browse_py.h' returned non-zero exit status 126.

权限不够
参考linux 下boost编译
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master chmod +x ./src/inline.sh
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master sudo ./configure.py --bootstrap

warning: A compatible version of re2c (>= 0.15.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
bootstrap complete.  rebuilding...
[32/32] LINK ninja

在这里插入图片描述
粘贴到/home/cszx/miniconda3/envs/zgp_m3dm_main/bin
不成功
粘贴到 /usr/bin
但是

/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/python3.8 /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/main.py 
has featurestorch
has featuresnp
has featuresmatplotlib 
has modtimm
has modpointnet2_utilstimm
/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py:353: UserWarning: !! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 5.0 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 5 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
Traceback (most recent call last):File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_buildsubprocess.run(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/subprocess.py", line 516, in runraise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.The above exception was the direct cause of the following exception:Traceback (most recent call last):File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/main.py", line 2, in <module>from m3dm_runner import M3DMFile "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/m3dm_runner.py", line 4, in <module>from feature_extractors import multiple_featuresFile "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/feature_extractors/multiple_features.py", line 2, in <module>from .features import FeaturesFile "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/feature_extractors/features.py", line 27, in <module>from models.models import ModelFile "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/models/models.py", line 8, in <module>from knn_cuda import KNNFile "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/__init__.py", line 38, in <module>_knn = load_cpp_ext("knn")File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/__init__.py", line 26, in load_cpp_extext = load(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in loadreturn _jit_compile(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1425, in _jit_compile_write_ninja_file_and_build_library(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1537, in _write_ninja_file_and_build_library_run_ninja_build(File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_buildraise RuntimeError(message) from e
RuntimeError: Error building extension 'knn': [1/3] c++ -MMD -MF knn.o.d -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/TH -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O2 -c /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cpp -o knn.o 
FAILED: knn.o 
c++ -MMD -MF knn.o.d -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/TH -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O2 -c /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cpp -o knn.o 
c++: error: unrecognized command line option '-std=c++14'
[2/3] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/TH -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -std=c++14 -c /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cu -o knn.cuda.o 
nvcc warning : The -std=c++14 flag is not supported with the configured host compiler. Flag will be ignored.
ninja: build stopped: subcommand failed.Process finished with exit code 1

删掉usr中的,还是一样

sudo yum install ninja-build(失败)

网络不行
在这里插入图片描述

还是不行

重设置环境变量

(zgp_m3dm_main) ~ export CC=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/gcc
(zgp_m3dm_main) ~ export CXX=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/g++

再次安装ninja(成功)

(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master chmod +x ./src/inline.sh   
(zgp_m3dm_main) ~/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/ninja-master sudo ./configure.py --bootstrap
[sudo] password for cszx: 
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.15.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
bootstrap complete.  rebuilding...
[31/31] LINK ninja

环境变量写入刷新,再次安装,再次粘贴到/home/cszx/miniconda3/envs/zgp_m3dm_main/bin

vim
export CC=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/gcc
export CXX=/home/cszx/miniconda3/envs/zgp_m3dm_main/bin/g++
还是不行
vim
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./home/cszx/miniconda3/envs/zgp_m3dm_main/lib
还是不行

zgp_m3dm_main) ~ strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH
(zgp_m3dm_main) ~ strings /usr/lib64/libstdc++.so.12 | grep GLIBCXX
strings: '/usr/lib64/libstdc++.so.12': No such file
(zgp_m3dm_main) ~ strings /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/libstdc++.so.12 | grep GLIBCXX
strings: '/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/libstdc++.so.12': No such file
(zgp_m3dm_main) ~ strings /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_DEBUG_MESSAGE_LENGTH
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@GLIBCXX_3.4
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.21
GLIBCXX_3.4.9
_ZSt10adopt_lock@@GLIBCXX_3.4.11
GLIBCXX_3.4.10
GLIBCXX_3.4.16
GLIBCXX_3.4.1
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv@GLIBCXX_3.4
GLIBCXX_3.4.28
_ZNSs7_M_copyEPcPKcm@GLIBCXX_3.4
GLIBCXX_3.4.25
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv@@GLIBCXX_3.4.5
_ZNSs7_M_moveEPcPKcm@@GLIBCXX_3.4.5
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEm@@GLIBCXX_3.4.5
_ZNSs4_Rep26_M_set_length_and_sharableEm@GLIBCXX_3.4
_ZSt10defer_lock@@GLIBCXX_3.4.11
_ZN10__gnu_norm15_List_node_base4swapERS0_S1_@@GLIBCXX_3.4
_ZNSs9_M_assignEPcmc@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEmmPKc@@GLIBCXX_3.4.5
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwm@GLIBCXX_3.4
GLIBCXX_3.4.24
_ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order@@GLIBCXX_3.4.11
GLIBCXX_3.4.20
_ZNSt11char_traitsIwE2eqERKwS2_@@GLIBCXX_3.4.5
GLIBCXX_3.4.12
_ZNSi6ignoreEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.2
_ZNSt11char_traitsIcE2eqERKcS2_@@GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.15
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNSs9_M_assignEPcmc@GLIBCXX_3.4
GLIBCXX_3.4.19
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv@GLIBCXX_3.4
GLIBCXX_3.4.27
_ZN10__gnu_norm15_List_node_base7reverseEv@@GLIBCXX_3.4
_ZN10__gnu_norm15_List_node_base4hookEPS0_@@GLIBCXX_3.4
_ZNSt11char_traitsIwE2eqERKwS2_@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwm@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwm@@GLIBCXX_3.4.5
GLIBCXX_3.4.23
GLIBCXX_3.4.3
GLIBCXX_3.4.7
_ZNSi6ignoreEl@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@@GLIBCXX_3.4.5
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv@GLIBCXX_3.4
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwm@@GLIBCXX_3.4.5
GLIBCXX_3.4.18
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEm@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl@@GLIBCXX_3.4.5
_ZSt15future_category@@GLIBCXX_3.4.14
_ZNSi6ignoreEl@GLIBCXX_3.4
GLIBCXX_3.4.29
_ZNSt11char_traitsIcE2eqERKcS2_@GLIBCXX_3.4
_ZNKSs15_M_check_lengthEmmPKc@GLIBCXX_3.4
_ZN10__gnu_norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwmw@GLIBCXX_3.4
_ZNVSt9__atomic011atomic_flag5clearESt12memory_order@@GLIBCXX_3.4.11
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSs7_M_moveEPcPKcm@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwmw@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEmmPKc@GLIBCXX_3.4
_ZNKSs11_M_disjunctEPKc@@GLIBCXX_3.4.5
_ZN10__gnu_norm15_List_node_base6unhookEv@@GLIBCXX_3.4
GLIBCXX_3.4.22
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv@@GLIBCXX_3.4.5
_ZNSi6ignoreEv@GLIBCXX_3.4
_ZNSs7_M_copyEPcPKcm@@GLIBCXX_3.4.5
GLIBCXX_3.4.8
GLIBCXX_3.4.13
_ZSt11try_to_lock@@GLIBCXX_3.4.11
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.17
GLIBCXX_3.4.4
_ZNKSs15_M_check_lengthEmmPKc@@GLIBCXX_3.4.5
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNSs4_Rep26_M_set_length_and_sharableEm@@GLIBCXX_3.4.5
GLIBCXX_3.4.26
_ZNKSs11_M_disjunctEPKc@GLIBCXX_3.4
发现在命令行中运行就好了,大概是因为库的名字写对了(成功)
(zgp_m3dm_main) ~ vim ~/.zshrc
(zgp_m3dm_main) ~ source ~/.zshrc
(base) ~ python /home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/main.py
has featurestorch
has featuresnp
has featuresmatplotlib 
has modtimm
has modpointnet2_utilstimm
has modKNN
Traceback (most recent call last):File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/main.py", line 4, in <module>import pandas as pd
ModuleNotFoundError: No module named 'pandas'
虽然在pycharm中还是这样,但是不理会了
RuntimeError: Error building extension 'knn': [1/2] c++ -MMD -MF knn.o.d -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/TH -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O2 -c /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cpp -o knn.o 
FAILED: knn.o 
c++ -MMD -MF knn.o.d -DTORCH_EXTENSION_NAME=knn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/TH -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/cszx/miniconda3/envs/zgp_m3dm_main/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O2 -c /home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/csrc/cuda/knn.cpp -o knn.o 
c++: error: unrecognized command line option '-std=c++14'
ninja: build stopped: subcommand failed.

继续安装 pip install pandas(成功)

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Installing collected packages: pytz, tzdata, pandas
Successfully installed pandas-2.0.3 pytz-2024.1 tzdata-2024.1
可以


http://www.ppmy.cn/devtools/33747.html

相关文章

练习题(2024/5/5)

1左叶子之和 给定二叉树的根节点 root &#xff0c;返回所有左叶子之和。 示例 1&#xff1a; 输入: root [3,9,20,null,null,15,7] 输出: 24 解释: 在这个二叉树中&#xff0c;有两个左叶子&#xff0c;分别是 9 和 15&#xff0c;所以返回 24示例 2: 输入: root [1] 输…

【实时数仓架构】方法论

笔者不是专业的实时数仓架构&#xff0c;这是笔者从其他人经验和网上资料整理而来&#xff0c;仅供参考。写此文章意义&#xff0c;加深对实时数仓理解。 一、实时数仓架构技术演进 1.1 四种架构演进 1&#xff09;离线大数据架构 一种批处理离线数据分析架构&#xff0c;…

Istio基础知识

一、什么是Istio Istio 提供⼀种简单的⽅式来为已部署的服务建⽴⽹络&#xff0c;该⽹络具有 负载均衡、服务间认证、监控等功能&#xff0c;只需要对服务的代码进⾏⼀点或不需要做任何改动。想要让服务⽀持 Istio&#xff0c;只需要在您的环境中部署⼀个特殊的 sidecar 代 理&…

python做题补充

不可以xy.sort(),用y.sort()即可&#xff0c;因为不会返回值。 ——————————————————————————————————————————— wordhello word.split() 默认是按空格进行分割&#xff0c;获得的是整个单词的列表。 而list(word)将返回 [h, e, l,…

SQL 基础 | BETWEEN 的常见用法

在SQL中&#xff0c;BETWEEN是一个操作符&#xff0c;用于选取介于两个值之间的数据。 它包含这两个边界值。BETWEEN操作符常用于WHERE子句中&#xff0c;以便选取某个范围内的值。 以下是BETWEEN的一些常见用法&#xff1a; 选取介于两个值之间的值&#xff1a; 使用 BETWEEN来…

HSM 中文应用笔记

AP32349 HSM 启动 AP32373 适用于 TC3xx 的 HSM 演示示例 AP32391 使用 HSM 安全启动 AP32399 TC3xx 调试保护&#xff08;带HSM&#xff09; AP32404 教程 TC3xx 使用 SWAP 机制进行无线软件更新 AP32456 TC3xx HSM 缓存使用教程 AP32470 HSM 演示优化代码 AP32481 教程调试器…

如何学习 Unreal Engine

学习Unreal Engine&#xff08;简称UE&#xff09;&#xff0c;尤其是最新的UE5&#xff0c;是一项复杂但值得的任务&#xff0c;因为它是游戏开发和实时3D内容创建的强大工具。以下是一些建议来帮助您开始学习Unreal Engine&#xff1a; 1. **了解基础知识**&#xff1a;在深…

Gitflow:一种依据 Git 构建的分支管理工作流程模式

文章目录 前言Gitflow 背景Gitflow 中的分支模型Gitflow 的版本号管理简单模拟 Gitflow 工作流 前言 Gitflow 工作流是一种版本控制流程&#xff0c;主要适用于较大规模的团队。这个流程在团队中进行合作时可以避免冲突&#xff0c;并能快速地完成项目&#xff0c;因此在很多软…