[Tutor] Installing modules with easy_install
Ray Jones
crawlzone at gmail.com
Tue Aug 28 19:41:38 CEST 2012
I'm working on another Python replacement for a Bash script, and I ran
into a need for enhanced time zone functions. Following directions I
found on a web site, I did the following:
# easy_install --upgrade pytz
Searching for pytz
Reading http://pypi.python.org/simple/pytz/
Reading http://pytz.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=79122
Reading http://www.stuartbishop.net/Software/pytz
Reading http://sourceforge.net/projects/pytz/
Best match: pytz 2012d
Downloading
http://pypi.python.org/packages/2.7/p/pytz/pytz-2012d-py2.7.egg#md5=e6f9219ae6eff242f13c6700413df69e
Processing pytz-2012d-py2.7.egg
creating /usr/local/lib/python2.7/dist-packages/pytz-2012d-py2.7.egg
Extracting pytz-2012d-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding pytz 2012d to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/pytz-2012d-py2.7.egg
Processing dependencies for pytz
Finished processing dependencies for pytz
Everything I'm reading suggests that now I should have the pytz module
available to me. But from iPython:
In [1]: import pytz
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/ray/<ipython console> in <module>()
ImportError: No module named pytz
In [2]: import pytz-2012d
------------------------------------------------------------
File "<ipython console>", line 1
import pytz-2012d
^
SyntaxError: invalid syntax
So what do I need to do to get Python to recognize this module?
Ray
More information about the Tutor
mailing list