[Tutor] Installing modules with easy_install

Ray Jones crawlzone at gmail.com
Tue Aug 28 22:00:15 CEST 2012


On 08/28/2012 12:35 PM, Steven D'Aprano wrote:
> On 29/08/12 03:41, 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
> [...]
>> Everything I'm reading suggests that now I should have the pytz module
>> available to me. But from iPython:
>
>> ImportError: No module named pytz
>
>
> Any time you get mysterious errors in iPython, or IDLE, or any other
> add-on to Python, it is important to determine whether the problem is
> with Python itself, or the add-on.
>
> In this case, start up the vanilla Python interactive environment by
> entering "python" at the $ prompt, then "import pytz" at the >>> prompt.
>
> If you get an error:
>
> - copy and paste the full traceback
>
> - show us the contents of sys.path
>
>
> You can also determine how many Python installations you have. At the
> bash $ prompt, type:
>
> python TAB TAB
>
> (that is, press the TAB key twice is succession, do not type the
> letters "t" "a" "b")
>
> and your shell will list the possible executable Python's on your
> system. Copy and paste that output.
Oops. No, I see that /usr/local/lib/python2.7/dist-packages is included
in the sys.path. Now what?


Ray


More information about the Tutor mailing list