[Tutor] Installing modules with easy_install

Peter Otten __peter__ at web.de
Tue Aug 28 20:06:26 CEST 2012


Ray Jones wrote:

> 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

Do you have multiple python installations on your machine? Do you run 
easy_install in one and ipython in another?



More information about the Tutor mailing list