r_31415
r_31415

Reputation: 8982

Difference between /path/to/env/bin/python setup.py and python setup.py in virtualenv

This is a silly question but here it goes.

Usually, when I need to install a package in a virtual environment that for some reason is not playing nice with PIP , I activate such environment and then run /path/to/env/bin/python setup.py. This works fine but I have seen that some people just run python setup.py. Is it an omission of the full path? Or maybe, provided the virtual environment is activated, python setup.py installs the package in a virtual environment automatically. I don't know which one is correct.

Note: I don't want to mess up my clean Linux installation testing the hard way, so I thought it would be better to ask here.

Upvotes: 1

Views: 85

Answers (1)

Marcin
Marcin

Reputation: 49826

If you have activated the virtualenv in your shell, there is no difference. The obvious difference is that using the explicit path means you'll definitely get the version you expect.

Upvotes: 1

Related Questions