安装SparseConvNet的时候一直报错,截取了其中关键部分:
g++ -pthread -shared -B /home/fwq/anaconda3/envs/pcda/compiler_compat -L/home/fwq/anaconda3/envs/pcda/lib -Wl,-rpath=/home/fwq/anaconda3/envs/pcda/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.8/sparseconvnet/SCN/cuda.o build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o build/temp.linux-x86_64-3.8/sparseconvnet/SCN/pybind.o -L/home/fwq/lab/cuda102/lib64 -lcudart -o build/lib.linux-x86_64-3.8/sparseconvnet/SCN.cpython-38-x86_64-linux-gnu.so
/home/fwq/anaconda3/envs/pcda/compiler_compat/ld: build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o: unable to initialize decompress status for section .debug_info
/home/fwq/anaconda3/envs/pcda/compiler_compat/ld: build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o: unable to initialize decompress status for section .debug_info
/home/fwq/anaconda3/envs/pcda/compiler_compat/ld: build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o: unable to initialize decompress status for section .debug_info
/home/fwq/anaconda3/envs/pcda/compiler_compat/ld: build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o: unable to initialize decompress status for section .debug_info
build/temp.linux-x86_64-3.8/sparseconvnet/SCN/sparseconvnet_cuda.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1
这错误我折腾了将近三天,尝试了一大堆方法,都没有安装成功。
今天在pycocotools安装失败 compiler_compat/ld发现类似的问题,按照这位博主的说法,定位到 /home/fwq/anaconda3/envs/pcda/compiler_compat 目录,然后输入:
rename ld ld2 ld
将 ld 改名为 ld2,然后再次尝试安装:
bash develop.sh
终于看到了
Installed /home/fwq2/lab/cjy/SparseConvNet
Processing dependencies for sparseconvnet==0.2
Finished processing dependencies for sparseconvnet==0.2
虽然不知道为什么,但是终于成功给装上了😭😭😭