Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location of global libraries for Python on Mac?

I'm fighting with installation SIP for Python on Mac OS X. Finally after compilation and installation when I run console form folder of SIP (locally) I can import sipconfig, but when I`m in other folder I cant - there is no module called sipconfig.

My question is - Where is folder to which I have to copy modules if I want to have them available globally (like "import os"), or how I can check it, because location "/Library/Python/2.6/site-packages/" doesn`t work.

like image 951
michaltaberski Avatar asked Apr 29 '10 23:04

michaltaberski


People also ask

Where are libraries installed on Mac?

In the Finder, hold down the Option key when using the Go menu. Library will appear below the current user's home directory. Note: After you open the Library folder, you can drag the Library icon from the top of that window to the Dock, sidebar, or toolbar to make it readily accessible.

How do you find where are Python libraries stored?

Usually the Python library is located in the site-packages folder within the Python install directory, however, if it is not located in the site-packages folder and you are uncertain where it is installed, here is a Python sample to locate Python modules installed on your computer.


1 Answers

Try checking your python's sys.path list with:

import sys print(sys.path) 
like image 83
diatoid Avatar answered Oct 10 '22 06:10

diatoid