简体   繁体   中英

default python does not locate modules installed with homebrew

I am installing modules with homebrew and other installers, and they are not recognized by my default python. Module installations with easy_install (such as pip) appear to be available for my system and system python).

My default python is located here and is this version:

15:49 [~]: which python
/usr/local/bin/python

15:49 [~]: python -d
Python 2.7.2 (default, Mar 18 2012, 15:13:08)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information.

The packages do appear to be located in /library/frameworks/, GEOS.framework is one example.

What do I need to modify to gain access to my modules?

System: Mac os x 10.5.8

From the Homebrew page: "Homebrew installs packages into their own isolated prefix and then symlinks everything into /usr/local"

I think that the OS X preinstalled python looks for modules in /Library/Frameworks/Python.framework/Versions/Current//lib/python2.7/site-packages

So maybe you need to symlink your Homebrew installed packages to there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM