virtualenv: a virtual environment for linux
virtualenvwrapper: A tool based on virtualenv, through which you can easily create/activate/manage/destroy virtual environments. Without it, the above operations will be quite troublesome.
Install python3
sudo apt-get install python3
sudo apt-get install python-setuptools
Install pip
sudo apt-get install pip
Install virtualenv and virtualenvwrapper
$sudo apt-get install python-virtualenv
$sudo easy_install virtualenvwrapper
mkdir $HOME/.virtualenvs
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
source ~/.bashrc
mkvirtualenv [virtual environment name]
workon [virtual environment name]
deactivate
rmvirtualenv [virtual environment name]
Note: The created environment is independent and does not interfere with each other. You can use pip to manage the package without sudo permission. If you use sudo in the virtual environment, the package installed is in the main environment
Use the -p parameter to specify the version of python in the virtual environment
$ mkvirtualenv -p python django
**One more thing to note is that by default, all packages installed system-wide are visible to virtualenv. This means that if you install simplejso in your system Python directory, it will be automatically available to all virtualenvs. This behavior can be changed. Virtualenv with the --no-site-packages option added when creating a virtualenv will not read system packages, as follows:
virtualenv nowamagic_venv --no-site-packages
Install redis
Execute the following command in Ubuntu:
$sudo apt-get install redis-server
Start the server
$redis-server
Start the client
$redis-cli
Browser cache
Ctrl+Shift+Del shortcut key to clear Google browser cache
Ctrl+Shift+R Reload the current webpage without using cached content
Recommended Posts