简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM