I want to create a virtual environment using Enthought's Canopy distribution, but with no site packages.
following: https://support.enthought.com/entries/21802240-Use-venv-not-virtualenv-with-Canopy-Python
I set up the environment, leaving off the -s to not install the site packages:
$ venv path/to/virtual_environment_dir
$ source path/to/virtual_environment_dir/bin/activate
And this uses the correct python, but still uses the system easy_install
and pip
(env) $ which python
path/to/virtual_environment_dir/bin/python
(env) $ which easy_install
/usr/bin/easy_install
(env) $ which pip
/usr/local/bin/pip
So if I try to install anything, it just installs it globally.
Is there any way to install pip
into the virtual environment?
You have to install setuptools
and pip
manually into the environment. venv
in Canopy is backported from the venv
in Python 3, so unlike virtualenv
, it has no special support for pre-installing these packages into the new environment. Just follow the standard installation instructions for setuptools
and pip
using the new environment's python
executable.