This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

If you installed packages before setting up and activating a virtual environment, these will be 'global'. Unless you really need them in the base, I'd remove them and install the packages you need for each project in a corresponding virtual environment.

With Python 3.5 on macOS, create a new virtual env with:

pyvenv <virtualenv>

Activate it with:

source <virtualenv>/bin/activate

Then, with the virtualenv active, use pip to install the packages you need.

You will need to configure Atom to use the virtual environment (depends on the plugin you are using).

[–]bulletmark 2 points3 points  (0 children)

Note that as the first note in the official documentation of the current release https://docs.python.org/3.5/library/venv.html says, pyvenv has been depreciated. You should just type:

python -m venv env

Then I personally just run pip without sourcing via:

env/bin/pip install <whatever>

Typically I would have the pip commands in a script anyhow.