遗留一个 补充问题:
cuda8.0 的实际安装过程。
2。ubuntu 下 安装 opencv 环境
conda install --channel https://conda.anaconda.org/menpo opencv
3.anaconda 下 安装 numba 报错
ython3.5/site-packages (from numba) (1.18.5)
Building wheels for collected packages: llvmlite
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/iser/anaconda3/envs/voxelnet/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gorf6zhq/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gorf6zhq/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-42xn7x98
cwd: /tmp/pip-install-gorf6zhq/llvmlite/
Complete output (26 lines):
running bdist_wheel
/home/iser/anaconda3/envs/voxelnet/bin/python /tmp/pip-install-gorf6zhq/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-gorf6zhq/llvmlite/ffi/build.py", line 106, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/subprocess.py", line 629, in check_output
Running setup.py install for llvmlite ... error
通过安装 llvmlite解决
pip install llvmlite==0.31.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting llvmlite==0.31.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ab/7d/accde4254f32a5b9f2d354a85e50158f955363a5b5bbe7cc6c64f6f26c26/llvmlite-0.31.0-cp35-cp35m-manylinux1_x86_64.whl (20.2 MB)
|████████████████████████████████| 20.2 MB 11.8 MB/s
Installing collected packages: llvmlite
Successfully installed llvmlite-0.31.0
安装 时 通过执行命令 解决。
pip install llvmlite==0.31.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
(voxelnet) iser@iser:~/luogy/voxelnet$ pip install llvmlite==0.31.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting llvmlite==0.31.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ab/7d/accde4254f32a5b9f2d354a85e50158f955363a5b5bbe7cc6c64f6f26c26/llvmlite-0.31.0-cp35-cp35m-manylinux1_x86_64.whl (20.2 MB)
|████████████████████████████████| 20.2 MB 11.8 MB/s
Installing collected packages: llvmlite
Successfully installed llvmlite-0.31.0
(voxelnet) iser@iser:~/luogy/voxelnet$ pip install numba
(voxelnet) iser@iser:~/luogy/voxelnet$ pip install numba
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting numba
Using cached numba-0.47.0-cp35-cp35m-manylinux1_x86_64.whl (3.7 MB)
Requirement already satisfied: numpy in /home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages (from numba) (1.18.5)
Requirement already satisfied: llvmlite>=0.31.0dev0 in /home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages (from numba) (0.31.0)
Requirement already satisfied: setuptools in /home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages (from numba) (40.2.0)
Installing collected packages: numba
Successfully installed numba-0.47.0
4.scipy 报错
Traceback (most recent call last):
File "crop.py", line 3, in <module>
from scipy.misc import imread
ImportError: No module named 'scipy'
选择 执行:
pip install scipy--1.2.1
5. 显示报错没有模块 Type
(voxelnet) iser@iser:~/luogy/voxelnet/data$ python crop.py
Traceback (most recent call last):
File "crop.py", line 3, in <module>
from scipy.misc import imread
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/__init__.py", line 156, in <module>
from . import fft
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/fft/__init__.py", line 76, in <module>
from ._basic import (
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/fft/_basic.py", line 1, in <module>
from scipy._lib.uarray import generate_multimethod, Dispatchable
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/_lib/uarray.py", line 27, in <module>
from ._uarray import *
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/_lib/_uarray/__init__.py", line 114, in <module>
from ._backend import *
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/scipy/_lib/_uarray/_backend.py", line 1, in <module>
from typing import (
ImportError: cannot import name 'Type'
6.显示问题
(voxelnet) iser@iser:~/luogy/voxelnet/data$ python crop.py
Traceback (most recent call last):
File "crop.py", line 3, in <module>
from scipy.misc import imread
ImportError: cannot import name 'imread'
执行 scipy-1.2.1
Successfully installed scipy-1.2.1
(voxelnet) iser@iser:~/luogy/voxelnet$ cd data
(voxelnet) iser@iser:~/luogy/voxelnet/data$ python crop.py
Traceback (most recent call last):
File "crop.py", line 3, in <module>
from scipy.misc import imread
ImportError: cannot import name 'imread'
安装命令
pip install pillow
Traceback (most recent call last):
File "train.py", line 10, in <module>
import tensorflow as tf
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/iser/anaconda3/envs/voxelnet/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
https://developer.nvidia.com/rdp/cudnn-archive
下载 压缩包 :cudnn-8.0-linux-x64-v6.0.tgz
解压后 执行命令:
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*