1

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

You mean in case I forget to activate the environment and then use python setup.py? Then activating the environment AND using the full path is redundant?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.