[Pythonmac-SIG] Beginner's query: Path configuration in OS X 10.3

Jack Jansen Jack.Jansen at cwi.nl
Thu Feb 12 17:28:01 EST 2004


On 12 Feb 2004, at 23:04, Jeffrey Dean wrote:
> This doesn't work for me. Further, within the Library/Python folder I  
> found
> one entitled "IDE-Scripts", with a null file inside entitled "Place  
> your
> scripts here...", which looked really promising, but it didn't help  
> either.
> This folder, incidentally, was the only thing visible within the
> /Users/Myname/Library/Python folder. I created subfolders "2.3" and
> "site-packages" to try to follow Bob's advice. Perhaps I did this  
> wrongly.

No, this is what you should have done.... I don't understand why it  
didn't work, are you sure you didn't have any typos? Or, to recap, the  
full name of the folder should be  
"/Users/Myname/Library/Python/2.3/site-packages".
>
> FWIW, this is what I get from sys.path (which only works from within
> PythonIDE and not from the Terminal when running Python):
>
> ['/Applications/MacPython-2.3/PythonIDE.app/Contents/Resources',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/ 
> IDE',
> '/Applications/MacPython-2.3/PythonIDE.app/Contents/Resources',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python23.zip',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat
> -darwin',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat
> -mac',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat
> -mac/lib-scriptpackages',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/lib-
> tk',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/lib-
> dynload',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site
> -packages']

Mine has '/Users/jack/Library/Python/2.3/site-packages' appended at the  
very end...

>
> When I placed my scripts in /Library/Python/2.3 as Bob suggested, the
> identification line in the output of the reload call was:
>
> <module 'script4' from
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site
> -packages/script4.py'>

That's because of the symlink. Python thinks that site-packages is at  
the "normal" location of  
System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ 
site-packages, it is unaware of the symlink to /Library/Python/2.3. So,  
it's nothing to worry about.




More information about the Pythonmac-SIG mailing list