[Chicago] Anaconda vs. IDLE.

Lewit, Douglas d-lewit at neiu.edu
Thu Oct 15 15:08:17 CEST 2015


Hi everyone,

I wrote a message about this a few weeks back, and got a few replies, but
the issue never got resolved.  Now I think I can really identify the
problem, just not sure how to resolve it.  My Anaconda installation on my
Mac is great!  It's got every library I need, and plenty more libraries
that I haven't even heard of yet.  However, when I'm in IDLE (the default
interpreter) Python can't seem to access those extra third-party libraries
(such as numpy, sympy, scipy, and matplotlib ).  I think I may have
identified the source of the trouble.  I'm just sure how to fix it.

Here's what I've got so far:

Let's say I execute the following command in my bash shell:

*echo $PATH*

The output is below:

*Douglass-MacBook-Pro-Mac-HD2:~ administrator$ echo $PATH*

*//anaconda/bin:/Users/administrator/anaconda/bin:/Users/administrator/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin*


Now let's turn to IDLE for a moment.


*import os*

*print( os.getenv("PATH") )*


*'/usr/bin:/bin:/usr/sbin:/sbin'  ####  NOT the same as above!!!*


IDLE's $Path is obviously different from my Terminal's $Path, so when I'm
in IDLE all those wonderful libraries in my Anaconda installation are
invisible and inaccessible to Python from within IDLE.  ( Interestingly
enough, this is not an issue on my Ubuntu machine.  Only an issue on my
Mac.  Hmmmm???  Why is that? )


If anyone can provide a solution I would be very grateful.  Is there some
way (using "os" or "sys" functions) that I can get IDLE to "see" my
computer's complete path?  I tried to find a solution on Stack Overflow,
but the stuff I found there was a little incoherent.


Thanks everyone and have a fun weekend.


Warm regards,


Douglas Lewit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20151015/71dcfe34/attachment.html>


More information about the Chicago mailing list