1. Sandbox installation command:
Latest Version: sudo easy_install virtualenv or sudo apt-get install virtualenv
Specified version: Pip install virtualenv [= = Software version number]
Role: Virtualenv is used to create a standalone Python environment where multiple python is independent from each other.
Features: Install new packages without permission, different versions of the suite can be used for different applications, and package upgrades do not affect other applications
2, Installation Virtualenvwrapper
Virtualenvwrapper command:
Latest Version: sudo easy_install virtualenvwrapper or sudo apt-get install Virtualenvwrapper
Specified version: Pip install virtualenvwrapper [= = Software version number]
Role: Virtualenvwrapper is an expansion pack for virtualenv that facilitates the management of virtual environments
Function: Integrate all virtual environments into one directory; manage (add, delete, copy) virtual environments; switch Virtual environments
3. ' Configuration
In the terminal home input:
sudo vim ~/.BASHRC
Enter the configuration file at the end Plus:
Export workon_home= $HOME/.virtualenvsproject_home= $HOME/atguigu/workspacesource/usr/share/virtualenvwrapper/ virtualenvwrapper.sh
Exit file, execute at Terminal
SOURCE ~/.BASHRC
4. Create a virtual environment:
Ways to find the Pyhton version path: in Terminal input:
Whereis python3.5 (Pyhton version number)
In terminal input mkvirtualenv-p Pyhton version of Path virtual environment name for example: Mkvirtualenv-p/us/bin/python3.5 py3
Using Virtual environments:
Workon Virtual Environment name for example: Workon py3
Exiting a virtual environment
Deactivate
Linux installation sandbox virtualenv, Virtualenvwrapper