Python egg: where is it installed?

I am trying to install py-appscript on mac using sudo easy_install appscript. The command starts and I get the message "Installed / Library / Python /..../ appscript = 0.20.0-py2.5-maxosx-10.5-i386.egg".

However, when I run a tool that requires this (osaglue), I get an error that py-appscript is not installed. I assume that it is installed in some place that is not in my way, or that I need to do something else to install it.

Any ideas?

The exact text that I see when starting easy_install is:

Handling appscript-0.20.0-py2.5-MacOSX-10,5-i386.egg appscript 0.20.0 the version in easy-install.pth is already active

Installed / Library / Python / 2.5 / site-packages / appscript-0.20.0-py2.5-macosx-10.5-i386.egg Dependency handling for appscript == 0.20.0 Ready dependency handling for appscript == 0.20.0

and error when trying to start osaglue:

Sorry, py-appscript 0.18.1 or later is required to use osaglue. Please see the following page for information:

http://appscript.sourceforge.net/py-appscript/install.html 

Please install py-appscript and run this command again.

+4
source share
3 answers

Do you have several versions of Python installed on your computer? (Apple installs its own copy of Python in / System, by default with third-party modules in / Library / Python.) If so, it is possible that easy_install installs appscript for one Python, and osaglue uses another.

However, if you want to create glue code for objc-appscript, the easiest way is to use ASDictionary ( http://appscript.sourceforge.net/tools.html ) to create glue directly; no need to bother with installing py-appscript and other dependencies.

0
source

You can find all of your available packages in sys.path. Run pythonshell and enter this code:

 import sys print sys.path 
+2
source

What returns which python ?

Update: Ok, go to / usr / bin and run ls -l | grep python ls -l | grep python . Is /usr/bin/python to an OSX installation?

If it is not, I am having the same problem. easy_install installs the egg for the python package that ships with OSX, but you use a different version to execute the code when you call python. I believe my solution was to reinstall setuptools and say to put the eggs in place for the python distribution I wanted to use.

0
source

All Articles