1. Upgrade Python package management tool PIP
Pip Install--upgrade pip Note: ' Pip install--upgrade package name ' When you want to upgrade a package
2.python Virtual Environment Installation
sudo apt-get install Python-virtualenvsudo easy_install virtualenvwrapper
The mkvirtualenv command is not found when the above tool is installed, and the following environment variable settings are required.
1. Create a directory to hold the virtual environment mkdir $HOME/.VIRTUALENVS2. Add rows in ~/.BASHRC: export workon_home= $HOME/.virtualenvs Source/usr/local/bin/virtualenvwrapper.sh3. Run: source ~/.BASHRC
3. Create a Python virtual environment
mkvirtualenv [Virtual Environment name]workon [virtual environment name]
4. Exit from the virtual environment
Deactivate
5. Delete (Use caution)
rmvirtualenv [Virtual Environment name]
Installing virtual environments and environment configurations in Python programming in Ubuntu