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

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

文章目录

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+cu111
  Downloading 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+cu111
  Downloading 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.0
  Downloading 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+cu113
  Using 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+cu113
  Using 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.1
  Using 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, torchvision
  Attempting uninstall: torch
    Found existing installation: torch 1.9.0+cu111
    Uninstalling torch-1.9.0+cu111:
      Successfully uninstalled torch-1.9.0+cu111
  Attempting uninstall: torchaudio
    Found existing installation: torchaudio 0.9.0
    Uninstalling torchaudio-0.9.0:
      Successfully uninstalled torchaudio-0.9.0
  Attempting uninstall: torchvision
    Found existing installation: torchvision 0.10.0+cu111
    Uninstalling 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_lib
  Preparing metadata (setup.py) ... error
  error: 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 CUDAExtension
          library_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_paths
          if (not os.path.exists(_join_cuda_home(lib_dir)) and
        File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2125, in _join_cuda_home
          raise 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_lib
  Preparing metadata (setup.py) ... error
  error: 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 CUDAExtension
          library_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_paths
          if (not os.path.exists(_join_cuda_home(lib_dir)) and
        File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2125, in _join_cuda_home
          raise 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官网 (有用)

选择与系统对应的,比如

尝试第三种安装,但是手动下载保存,上传服务器

激活的虚拟环境中,执行安装命令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版本的情况)](https://blog.csdn.net/weixin_42141136/article/details/127164519?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171343207516800227481025%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=171343207516800227481025&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-127164519-null-null.142%5Ev100%5Epc_search_result_base3&utm_term=condalinux%E5%AE%89%E8%A3%85cuda&spm=1018.2226.3001.4187), ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/3aa27c2c1fc25f4f2f9866980a6a0313.webp) 用上下键移动,空格取消 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/08744001aaa3d41b43dea56443755412.webp) 下,进入toolkit ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/a5a28d8f60b3aca0d3b291ec0b8ebe02.webp) ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/2bc5f4421bd2feb079d500fa60f90da6.webp) 我没改路径 │ /usr/local/cuda-11.3/ 似乎成功了, Driver: Not Selected Toolkit: Installed in /usr/local/cuda-11.3/ Samples: Installed in /home/cszx/, but missing recommended libraries Please 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 root To 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 with the name of this run file: sudo .run --silent --driver Logfile 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/cuda−11.3!\[在这里插入图片描述\](https://img−blog.csdnimg.cn/direct/e8ad4b609f9847678fcdd0b5f1c26e25.png)!\[在这里插入图片描述\](https://img−blog.csdnimg.cn/direct/c2fdf79d9a8b4f85b676acedbf187e63.png)再次激活安装error:\[Errno2\]Nosuchfileordirectory:′:/usr/local/cuda−11.3/bin/nvcc′似乎不能有冒号修改环境变量删除字符xexportCUDAHOME=CUDA_HOME/usr/local/cuda-11.3 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/75bb0ddbc1a4f80ada64a57805e02234.webp) 再次激活安装 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/1959e6a546a70071f51a558928a226ac.webp) 还是 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++ 多版本间切换](https://blog.csdn.net/a_beatiful_knife/article/details/132061965?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171358299116800180680843%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=171358299116800180680843&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-132061965-null-null.142%5Ev100%5Epc_search_result_base3&utm_term=Please%20make%20sure%20to%20use%20an%20adequate%20version%20of%20g%2b%2b%20%28%3E=5.0.0,%20%3C=10.0.0%29&spm=1018.2226.3001.4187) 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 Resolution Dependencies 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 k Transaction 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 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/41df2615e22101f578fcaa49bcb26dce.webp) 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 Resolution Dependencies 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 k Transaction 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 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/6ab5dad8e12db19bbebd86f41d2d0d00.webp) 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++不同版本的安装和切换](https://blog.csdn.net/weixin_42347415/article/details/116576935?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171374999816800222846024%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=171374999816800222846024&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-116576935-null-null.142%5Ev100%5Epc_search_result_base3&utm_term=linux%E6%9F%A5%E7%9C%8B%E6%89%80%E6%9C%89%E7%89%88%E6%9C%ACg%2b%2b&spm=1018.2226.3001.4187) (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不可以 #### 利用conda下载conda install -c moussi gcc_impl_linux-64=8.4.0(有用) [Linux系统 利用conda更改gcc、g++版本(非root用户)](https://blog.csdn.net/qq_32100547/article/details/134181033?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171375092116800186535874%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=171375092116800186535874&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-134181033-null-null.142%5Ev100%5Epc_search_result_base3&utm_term=conda%E7%AE%A1%E7%90%86g%2b%2b%E7%89%88%E6%9C%AC&spm=1018.2226.3001.4187) 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)? y Downloading 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. #### 安装相同的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)? y Downloading 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_lib Preparing 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-ops Building wheel for pointnet2-ops (setup.py) ... done Created wheel for pointnet2-ops: filename=pointnet2_ops-3.0.0-cp38-cp38-linux_x86_64.whl size=6215366 sha256=e9acb26c148adf8da3365ab14e9fd84394574fc78507ca5f3a8e59a6f1c0035d Stored 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: wget Building wheel for wget (setup.py) ... done Created wheel for wget: filename=wget-3.2-py3-none-any.whl size=9655 sha256=81928f3c43dda748ad9642fdcebb1f5d01eeb96c4e02e698e80dec4cfd47edc7 Stored 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, tensorboard Attempting uninstall: setuptools Found existing installation: setuptools 68.2.2 Uninstalling 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)? y Downloading 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](https://blog.csdn.net/weixin_34128534/article/details/91953683?ops_request_misc=&request_id=&biz_id=102&utm_term=sudo:%20./configure.py:%20command%20&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-91953683.142%5Ev100%5Epc_search_result_base3&spm=1018.2226.3001.4187) (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 variables=[('varname', 'kBrowsePy')]) File "./configure.py", line 166, in build self._run_command(self._expand(cmd, local_vars)) File "./configure.py", line 191, in _run_command subprocess.check_call(cmdline, shell=True) File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call raise 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编译](https://blog.csdn.net/nohackcc/article/details/8987268?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171377445016800213041362%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=171377445016800213041362&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-8987268-null-null.142%5Ev100%5Epc_search_result_base3&utm_term=bootstrapping%20ninja...%20/bin/sh:%20./src/inline.sh:%20Permission%20denied&spm=1018.2226.3001.4187) (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 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/9c1ce4885a94a4296aed2d09ca7ff401.webp) 粘贴到/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_build subprocess.run( File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/subprocess.py", line 516, in run raise 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 from m3dm_runner import M3DM File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/m3dm_runner.py", line 4, in from feature_extractors import multiple_features File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/feature_extractors/multiple_features.py", line 2, in from .features import Features File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/feature_extractors/features.py", line 27, in from models.models import Model File "/home/cszx/zgp/M3DM_RGB_PC/M3DM-main/M3DM-main/models/models.py", line 8, in from knn_cuda import KNN File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/knn_cuda/__init__.py", line 38, in _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_ext ext = load( File "/home/cszx/miniconda3/envs/zgp_m3dm_main/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in load return _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_build raise 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(失败) 网络不行 ![在这里插入图片描述](https://file.jishuzhan.net/article/1787325947951714306/1f52523afa4cb9274e57cb0a432a956d.webp) 还是不行 #### 重设置环境变量 (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 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 可以

相关推荐
inquisiter1 分钟前
UEFI镜像结构布局
linux·spring
孤独得猿17 分钟前
Qt常用控件第一部分
服务器·开发语言·qt
吴梓穆22 分钟前
UE5学习笔记 FPS游戏制作37 蓝图函数库 自己定义公共方法
笔记·学习·ue5
吴梓穆29 分钟前
UE5学习笔记 FPS游戏制作41 世界模式显示UI
笔记·学习·ue5
不爱吃鱼的猫-32 分钟前
Node.js 安装与配置全攻略:从入门到高效开发
服务器·node.js
Linux运维老纪43 分钟前
运维之 Centos7 防火墙(CentOS 7 Firewall for Operations and Maintenance)
linux·安全·centos·云计算·运维开发·火绒
斯普信专业组1 小时前
Ceph异地数据同步之-RBD异地同步复制(下)
linux·服务器·ceph
counsellor1 小时前
CentOS 7安装hyperscan
linux·centos·hyperscan
电星托马斯1 小时前
Linux系统CentOS 6.3安装图文详解
linux·运维·服务器·程序人生·centos
啞謎专家1 小时前
CentOS中挂载新盘LVM指南:轻松扩展存储空间,解决磁盘容量不足问题
linux·运维·服务器