4

Total noob...I followed some instructions to install various programs from GitHub which didn't come with explanations on how virtualenv works and why it's best practice.

Now I understand via this answer that virtualenvwrapper in ~/.virtualenvs is the way to go.

What do I do now to clean up my global packages?

Can I just leave them there and get on with my life?

I'm officially getting nowhere in my Python coding journey so far :P

(if it helps: I may have installed Python via Homebrew as well as their official Downloads page it's hard to remember if I did both or just one.)

  • 3
    `pip freeze` and then just `pip uninstall ` – felipe Mar 30 '23 at 23:31
  • 4
    You can do either of the options your listed. [This answer](https://stackoverflow.com/a/40566052/11286032) tells you how to remove them or you can leave them if you want. – Marcelo Paco Mar 30 '23 at 23:32
  • Thanks @Felipe and Marcelo Paco! - I think I'll just leave them and cross my fingers I don't have conflicts later... I will say, there are several dozens of packages, so it would be a real pain to uninstall them with the instructions ☝️ above – Climate Tech Handbook Mar 30 '23 at 23:39
  • At worst, they are taking up space and *available* to your global Python installation, and you would want to install it again in your virtual environment. – chepner Mar 31 '23 at 22:49

1 Answers1

0

Answer found in comments above:

Not dangerous to leave them.

Use these instructions to remove the global packages in fancy way.

Or use the simple way: pip freeze then pip uninstall <package> to do manually one at a time.

  • 1
    Welcome to SO. I'd suggest quoting the relevant command(s) from the linked answer to make it easier for future readers of this thread to find a solution. Reproducing the important parts from linked web-pages is considered good practice to avoid problems with dead-links. – Kyle F Hartzenberg Apr 05 '23 at 05:27