[Chicago] Anaconda vs. IDLE.

Carl Karsten carl at personnelware.com
Thu Oct 15 16:59:23 CEST 2015


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


More information about the Chicago mailing list