Table of contents
1. Install Ubuntu, see the link
3. Upgrade anaconda or application library, install/delete library
4. Virtual environment management
Five. Install opencv under anaconda
1. Install Ubuntu, see the link
Ubuntu installation tutorial (hands-on) - Ji Yu's Blog - CSDN Blog
2. Install anaconda
"Download the anaconda installation package according to the version you need"
1. Download the installation package Anaconda | The World's Most Popular Data Science Platform from the official website
2.Ubuntu command to download the anaconda installation package
wget https://repo.continuum.io/archive/Anaconda3-5.3.1-Linux-x86_64.sh
3. After the download is complete, open the terminal in the directory where the file is located and add execution permissions
chmod 755 Anaconda3-5.3.1-Linux-x86_64.sh
4. Enter the directory where the installation package is located, and use the bash command to install anaconda
bash Anaconda3-5.3.1-Linux-x86_64.sh
5. See please answer 'yes' or 'no': >>> enter yes
At the end of the execution, see Thank you for installing Anaconda3! The installation is successful
5. Try using the conda command conda list
In case of error, use
echo 'export PATH="/home/username/anaconda3/bin:$PATH"'
This is set according to your path. Then restart the virtual machine and execute the following command
source ~/.bashrc
3. Upgrade anaconda or application library, install/delete library
1. Upgrade anaconda
conda update conda
2. Upgrade the application library
conda update repository
3. Upgrade all libraries
conda update --all
4. Install the application library
conda install library / pip install library
5. Delete the application library
conda remove library/pip remove library
4. Virtual environment management
1. View all virtual environments
conda env list
2. Create a virtual environment
conda create --name virtual environment name pythonx.x
3. Create a virtual environment and automatically build the environment at the same time
conda create --name virtual environment name python=xx anaconda framework name
It doesn't have to be the same, just succeed
4. Delete the virtual environment
conda remove --name virtual environment name --all
5. Enter the virtual environment
source activate virtual environment name
6. Exit the virtual environment
source deactivate virtual environment name
Five. Install opencv
1. Enter the command:
conda install opencv
Slow, needs good internet speed
2. Download the opencv file that is compatible with the environment, which should correspond to your own python interpreter and virtual machine operating system, opencv download link
3. Copy the downloaded file to the main directory
4. Install
pip install main directory + file name
5. Test
python
import cv2