View Single Post
Old 10-19-2009, 04:08 PM   #48
epstewart
Connoisseur
epstewart will become famous soon enoughepstewart will become famous soon enoughepstewart will become famous soon enoughepstewart will become famous soon enoughepstewart will become famous soon enoughepstewart will become famous soon enough
 
Posts: 54
Karma: 558
Join Date: Oct 2009
Device: iPhone 3G 16GB, B&N nook
Quote:
Originally Posted by adullday View Post
Without going through your exact steps, I'm taking a wild guess here, but it looks like the pycrypto library got attached to the built-in python (which is good), but when you double click on the script it's running itself using the python you installed (/usr/local/bin/pythonw).

Try running the script from a fresh Terminal window.
e.g.
Code:
/usr/bin/python /Users/eric/Desktop/ineptepub.py
Thanks, adullday. When I ran
/usr/bin/python /Users/eric/Desktop/ineptepub.py

in Terminal I again got the error I mentioned in my first post. When I followed the advice I got from Howard in his post and ran
/usr/bin/python /Users/eric/Desktop/pycrypto-2.0.1/test.py
I got
Traceback (most recent call last):
File "/Users/eric/Desktop/pycrypto-2.0.1/test.py", line 18, in <module>
from Crypto.Util import test
ImportError: No module named Crypto.Util

It seems I have too many Pythons. I used
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
in Terminal to make all my files show up in Finder. Then I went into /usr/bin/ and found various items whose names begin with python. Most are aliases. The original of the python alias is
/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5

Meanwhile, I've been able to discover that Crypto installed itself as
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Crypto

So I'm somehow using Python 2.5 instead of 2.6, which is where Crypto is!

I note that 2.5 is in the /System/Library/ hierarchy while 2.6 is in the /Library/ hierarchy.

Can one of you experts tell me how to correct this? Many thanks in advance ...


Eric
epstewart is offline   Reply With Quote