- Create and activate virtualenv
- Create virtualenv with system packages
- Create virtualenv using Python 3 interpreter
- Install package for the currently activated virtualenv
- Install a package globally
If you need to work with python you'll sooner or later bump into one of these terms so they will be defined here for future reference.
Package installer for Python. Like gem for ruby.
A tool to help you keep multiple versions of python (and separate python packages) for each of your projects. Think of rvm and gemsets for ruby.
Create and activate virtualenv
$ virtualenv <your-env-name> $ . <your-env-name>/bin/activate
(to deactivate it, just run
deactivate from anywhere in your system
Create virtualenv with system packages
To include system packages (i.e. those you have installed with
apt-get or the like) use
$ virtualenv <your-env-name> --system-site-packages
Create virtualenv using Python 3 interpreter
$ virtualenv -p python3 <your-env-name>
Install package for the currently activated
(my-env)$ pip install <package-name>
Install a package globally
$ sudo pip install <package-name>