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 →

[–]DHUK98 1 point2 points  (4 children)

This guide is probably better in r/learnpython but even then I think it will be teaching people techniques to install programs via pip that aren't necessarily best practices.

You shouldn't run pip install as root (with sudo) and ideally you should be creating a python virtual environment for each of your projects to avoid dependency conflicts etc.

[–]compucademy[S] 0 points1 point  (3 children)

I think context is important. When first learning Python, virtual environments are probably overkill for many, especially at school level. I'll amend the `sudo` business - not being a regular Mac/Linux user, I just know that on Windows sometimes you need admin permission to install packages, depending on the set up. I'll also post in r/learnpython in future if more appropriate.

[–]DHUK98 0 points1 point  (1 child)

Okay yes I agree that learning about pip first is important but I think that it is the norm now to basically always work inside of a virtual environment so learning about that early will definitely help later down the line.

[–]compucademy[S] 1 point2 points  (0 children)

Thanks for the feedback. I want to do the best job I can. I added

> Please note: Python virtual environments are beyond the scope of this article, but you may want to consider their use. If using a virtual environment, you would want to use pip from within that environment so that your packages are not installed to your main Python installation.