[Tutor] Installing modules with easy_install

Steven D'Aprano steve at pearwood.info
Tue Aug 28 21:35:10 CEST 2012


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.



-- 
Steven


More information about the Tutor mailing list