Creating virtualenv using the python3 -m venv command
I had the same problem as you. In my case, I created virtualenv using the command
python3 -m venv ./my_virtual_env --system-site-packages
The problem was that I could not install jupyter inside the virtual environment, as it was already in the system-site-package (when I try to install it, it tells you "The request has already been completed").
To install jupyter (and in the first instance, which is not installed in your virtual environment using this command), but still has access to the system-site-package, which you can run:
python3 -m venv ./my_virtual_env
Activate the virtual environment, run pip3 install jupyter
(and pip3 install pip
), and then include the include-system-site-packages option in the file. / my _virtual_env / pyvenv.cfg.
After deactivating and reactivating your environment, you will gain access to the system package sites.
Creating a virtual virtual machine using the virtualenv command
Given this answer , you can prevent access to system package sites by creating a file. / my _virtual_env / lib / python3.4 / no-global-site-packages.txt and get access back by deleting it.
source share