First install pip install Virtualenvwrapper
then modify the bash configuration file. Forget where the path is, so add a description for one end of the configuration file
(1)/etc/profile: This file sets the environment information for each user of the system, and the file is executed when the user logs on for the first time. and collect the shell settings from the configuration file of the/ETC/PROFILE.D directory.
(2)/ETC/BASH.BASHRC: Executes this file for each user running the bash shell. When the bash shell is opened, the file is read.
(3) ~/.bash_profile: Each user can use the file to enter shell information dedicated to their own use, when the user logs on, the file is only executed once! By default, he sets some environment variables to execute the user's. bashrc file.
(4) ~/.BASHRC: This file contains bash information dedicated to your bash shell, which is read when you log on and every time you open a new shell.
I'm using Ubuntu. Self-developed. Add a
to the second file directly
source/usr/local/bin/virtualenvwrapper.sh
then
mkvirtualenv Py-flask
Workon Py-flask
the rest depends on you.
To Python with Virtualenvwrapper