[Chicago] Anaconda vs. IDLE.

Lewit, Douglas d-lewit at neiu.edu
Thu Oct 15 18:04:28 CEST 2015


Hi Carl,

Thanks for trying to follow the messages.  I know it's gotta be confusing.
What you have is correct.  That's my $PATH variable.  Unfortunately what I
have in IDLE is a somewhat truncated or incomplete $PATH variable, and
that's why Python can't access certain libraries when I'm running Python in
IDLE.  (But in Anaconda everything is just fine.  But for certain things I
really do have a preference for IDLE.)  I'm just not sure how to fix the
problem.  I opened up IDLE's preferences, but there's nothing there about
changing the $PATH variable.

The way I'm opening IDLE from the Terminal prompt.... could that be the
problem?

*open -a IDLE*

That does indeed open up an IDLE shell.  Is there a better way?

Thanks.


On Thu, Oct 15, 2015 at 9:59 AM, Carl Karsten <carl at personnelware.com>
wrote:

> trying to follow what you are doing over different messages isn't
> easy, and likely skipping a detail that makes a difference.
>
> open a terminal
> show path
> run idle
> show path
>
> cut/paste all of that.
>
> should look about like this:
>
> 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
>
> (run idle from prompt)
>
> import os
> print( os.getenv("PATH") )
>
> On Thu, Oct 15, 2015 at 9:39 AM, Lewit, Douglas <d-lewit at neiu.edu> wrote:
> > Hey David,
> >
> > Your suggestions are good and logical, but unfortunately they don't
> work.  I
> > tried opening IDLE from within Terminal, but that didn't help.  I also
> tried
> > the "putenv" from the os library.  It didn't produce any error message,
> but
> > when I checked my $PATH with os.getenv( ) it was the same as before.  I'm
> > not entirely sure this is a pure Python problem.  It could be a Mac OS-X
> > problem too.  As I mentioned earlier, this doesn't seem to be an issue
> on my
> > Ubuntu machine.  As for Windows, I have no idea.  I normally do not use
> > Windows unless I really have to.
> >
> > Thanks,
> >
> > Douglas.
> >
> >
> > On Thu, Oct 15, 2015 at 8:25 AM, Lewit, Douglas <d-lewit at neiu.edu>
> wrote:
> >>
> >> Hey David,
> >>
> >> I'll try this out.  I gotta shut down the laptop and get to work!  But
> >> thanks for the easy solution.  I will try both suggestions can get back
> to
> >> you--probably tomorrow.
> >>
> >> Have a great day and thanks so much!
> >>
> >> On Thu, Oct 15, 2015 at 8:21 AM, David Rock <david at graniteweb.com>
> wrote:
> >>>
> >>> * Lewit, Douglas <d-lewit at neiu.edu> [2015-10-15 08:08]:
> >>> >
> >>> >
> >>> >
> *//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!!!*
> >>> >
> >>> > 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.
> >>>
> >>>
> >>> How are you starting IDLE?  If you are starting it from the Terminal,
> it
> >>> should inherit the same $PATH.
> >>>
> >>> As for setting it within IDLE, you used os.getenv to see $PATH, try
> using
> >>> os.putenv to set it:
> >>>
> >>>
> >>>
> os.putenv("PATH","/anaconda/bin:/Users/administrator/anaconda/bin:/Users/administrator/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin")
> >>>
> >>>
> >>> --
> >>> David Rock
> >>> david at graniteweb.com
> >>> _______________________________________________
> >>> Chicago mailing list
> >>> Chicago at python.org
> >>> https://mail.python.org/mailman/listinfo/chicago
> >>
> >>
> >
> >
> > _______________________________________________
> > Chicago mailing list
> > Chicago at python.org
> > https://mail.python.org/mailman/listinfo/chicago
> >
>
>
>
> --
> Carl K
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20151015/545325c6/attachment.html>


More information about the Chicago mailing list