4

I am relatively new to setting up my own programming environment from scratch. I followed this tutorial and set up a virtual machine as well as a virtual environment. When I started working on a project and installing packages (presumably on my virtual environment once I activated it), it did not take long until I was completely lost.

I don't understand how to track:

  • The differences between pip and pip3 (What does it mean if a package in installed for Python2 vs for Python3?)
  • How to see if a package is actually installed locally vs globally?
  • How to see if a package is installed for a specific user vs globally?
  • What is the difference between virtual environment package installation vs only for a user vs globally?
  • Etc...

Could someone either answers some of the questions above or point me to a good place to learn the basics and to learn how to properly set up package management well, so that I can build and update packages with confidence going forward.

I am running a Ubuntu 18.04.2 LTS

P.S. Maybe this questioned is asked already somewhere, but I could not find the answers.

steeldriver
  • 136,215
  • 21
  • 243
  • 336
  • 1
    FWIIW, this post helped me the most so far: https://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ – Newskooler Mar 17 '19 at 21:33
  • 1
    You can check to see if a command is installed locally or globally by using the which command. For example, which youtube-dl. Although, sometimes a package is installed both globally and locally and for this you can run whereis youtube-dl instead, to show all installed paths. Of course, If it shows a local path, it's installed locally. – mchid Jan 19 '22 at 09:52

0 Answers0