Recently I had a question come in from a reader on how to determine where the site packages are installed on macOS Mojave. So, what I wanted to do was create a short video explaining how to find these site packages and how to see what packages are installed. This technique should be applicable on macOS Mojave or High Sierra both. First, let's understand why you would want to know where the site packages are installed on any system? The main reason would be for making development decisions about how to design you Python program. This can be especially valuable for knowing which site packages are installed and which versions are being used to help you navigate the amount of work involved in architecting your program. Knowing the site packages can also allow you to see the system constraints that your program is starting off with.
Finding the Packages 🐍
From the terminal you will enter the command: "python -m site." This should print out a list of the directories Python uses when looking for site packages or frameworks when executing Python code. To further help, here is a short video tutorial that I created on how to run through this process on macOS:
Hopefully this gives you more insight into how to find the site packages used by the system level version of Python on macOS. Please let me know if you have any questions, comments, or concerns. Thank you!