LinkopingsStudentspex / internsidor

GNU General Public License v2.0
3 stars 0 forks source link

Recommend using `python3 -m pip` instead of `pip` #35

Closed Rovanion closed 2 years ago

Rovanion commented 2 years ago

This apparently results in fewer headaches. For more info: https://snarky.ca/why-you-should-use-python-m-pip/

Karlinde commented 2 years ago

I would suggest recommending using a virtual environment instead, by

python3 -m venv .venv
source .venv/bin/activate (Linux) or .venv\Scripts\activate (Windows)
pip install -r requirements.txt

This leaves the selection of which python paths to use (and thus which pip) up to the virtual environment, plus the package installations are isolated from the rest of the system. The folder ".venv" is already added to .gitignore in the repo for this purpose.

Rovanion commented 2 years ago

Both should be recommended IMO. Using python -m pip solved one issue I had in a virtual env. Though that is for a separate PR.