[Chicago] Anaconda vs. IDLE.

JP Bader jp at zavteq.com
Thu Oct 15 18:44:25 CEST 2015


>
> Doug -
>
> As David mentioned, normally if you launch IDLE from bash (terminal,
> iterm, etc), it should grab the path from your ~/.bashrc file. That said,
> if you aren't finding it there, you could load it this way:
>
> import sys
> sys.path.insert(0, '/home/user/lib/pythonX.X/site-packages')
>
> If you're launching IDLE directly, then you might want to edit the IDLE
> settings to include your PATH. It should be in /usr/bin/idle
>
> Check against you're ubuntu, but you might have ~/.profile in ubuntu which
> could have your PYTHONPATH. That might be what your OSX is missing? IDLE
> doesn't look for ~/.bashrc, so that could be why it's not pulling it in.
>
> Good luck
>
> JP
>
>
>
> 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
>>
>>
>
>
> --
> JP Bader
> Principal
> Next Health Choice, LLC
> jp at nexthealthchoice.com | 312.614.1267
>
>


-- 
JP Bader
Principal
Zavteq, Inc.
@lordB8r | jp at zavteq.com
608.692.2468
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20151015/0331a50c/attachment-0001.html>


More information about the Chicago mailing list