A virtual environment for Virtualenv:linux
Virtualenvwrapper: Based on a tool on the virtualenv, it is easy to create/activate/manage/Destroy the virtual environment, without it, the above operation will be quite cumbersome.
Installing Python3
sudo apt-get install Python3
sudo apt-get install Python-setuptools
Install PIP
sudo apt-get install pip
Installing Virtualenv and Virtualenvwrapper
$sudo Apt-get Install Python-virtualenv
$sudo Easy_install Virtualenvwrapper
1. Create a directory to store the virtual environment
mkdir $HOME/.virtualenvs
2. Add lines in ~/.BASHRC:
Export Workon_home= $HOME/.virtualenvs
source/usr/local/bin/virtualenvwrapper.sh
3. Run:
Source ~/.BASHRC
3. Create a Python virtual environment
mkvirtualenv [Virtual Environment name]
4. Switch the virtual environment
Workon [Virtual Environment name]
5. Exiting the virtual environment
Deactivate
6. Deleting a virtual environment
rmvirtualenv [Virtual environment name]
Note: Created environment is independent, non-interference, without sudo permissions can use PIP to manage the package, if you use sudo installed in the virtual environment package in the main environment
Specify the version of Python in the virtual environment using the-p parameter
$ mkvirtualenv-p Python Django
To install Redis, perform the following command in Ubuntu:
$sudo Apt-get Install Redis-server
Start the service side
$redis-server
Start the client
$redis-CLI
Browser cache
Ctrl+shift+del Clear Google browser cache shortcut keys
Ctrl+shift+r Reload the current Web page without using cached content
This article is from the "Ride a Pig to Travel" blog, please be sure to keep this source http://songqinglong.blog.51cto.com/7591177/1934889
Installing the Python Development environment (VIRTUALENV and Virtualenvwrapper) in Ubuntu