Ubuntu环境(自用)

Anaconda

Anaconda | The World's Most Popular Data Science Platform

bash A..........


Opencv

pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com opencv-python --verbose
pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com opencv-contrib-python --verbose

Numpy

pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com numpy

禁用nouveau

sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
lsmod | grep nouveau

CUDA10.0(不支持20.04)

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
sudo sh cuda_10.0.130_410.48_linux.run

Do you accept the previously read EULA?
accept/decline/quit: accept

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 410.48?
(y)es/(n)o/(q)uit: no

Install the CUDA 10.0 Toolkit?
(y)es/(n)o/(q)uit: yes

Enter Toolkit Location
 [ default is /usr/local/cuda-10.0 ]:

Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: yes

Install the CUDA 10.0 Samples?
(y)es/(n)o/(q)uit: yes

等到安装结束即可.

配置环境变量:

vim ~/.bashrc

末尾加上以下两句话:

export PATH=/usr/local/cuda/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH


cuDNN

sudo dpkg -i  libcudnn7_7.6.5.32-1+cuda10.0_amd64.deb

sudo dpkg -i  libcudnn7-dev_7.6.5.32-1+cuda10.0_amd64.deb

sudo dpkg -i  libcudnn7-doc_7.6.5.32-1+cuda10.0_amd64.deb

Pytorch

PyTorch

你可能感兴趣的:(ubuntu,python,linux)