Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #################### virtualenv Installation ######################
- $ sudo apt-get install python-setuptools python-dev build-essential
- $ easy_install pip
- $ sudo pip install virtualenv virtualenvwrapper
- # Python3 (important)
- $ sudo apt-get install python3-pip
- # Add following lines to .bashrc
- export WORKON_HOME=$HOME/.virtualenvs
- source /usr/local/bin/virtualenvwrapper.sh
- export PIP_VIRTUALENV_BASE=$WORKON_HOME
- ###################################################################
- ## Instruction ##
- # Create virtualenv workspace
- $ mkvirtualenv <working_dir>
- # Remove virtualenv workspace
- $ rmvirtualenv <virtualenv_name>
- # (optional)
- $ sudo rm -rf <virtualenv_name_dir>
- # Deactivate current virtualenv
- $ deactivate
- # List or select working virtualenv dir
- $ workon
- $ workon <virtualenv_name>
- # Install Python module (selected virtualenv)
- $ pip install numpy
- # OR
- $ pip3 install numpy
- # List installed Python modules
- $ pip freeze
- $ pip3 freeze
- ## NOTE ##
- # "pip" is a command to donwload and install Python2-3.4 module
- # while "pip3" is a command for Python3.5++
- ## References ##
- # https://juacompe.wordpress.com/2013/02/25/how-to-install-virtualenv-and-virtualenvwrappe/
- # https://dimamoroz.com/blog/2-python-virtual-environment-ubuntu/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement