[Tutor] Python help

Cameron Simpson cs at zip.com.au
Sun Jul 23 19:11:58 EDT 2017


On 23Jul2017 13:40, Winonah Ojanen <winonah1992 at gmail.com> wrote:
>I also tried the correct command for the mac ox s in terminal shell,
>running:
>
>Jims-MacBook-Pro-2:~ Jim$
>PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH
>> export PYTHONPATH
[...]
>> I did use the pip command and am attempting to add the files to my python
>> path. I used
>>  import sys
>> sys.path.append("/Users/Jim/Documents/illustris_python")

Please always reply-all or reply-to-list.

The python path is a list of places to look for modules. By adding 
'....../illustris_python' you're implying you want the module to be at 
'....../illustris_python/illustris_python'.

See if using '/Users/Jim/Documents' finds the module. Then move it to a better 
(more targeted) directory and use that directory's name :-)

Cheers,
Cameron Simpson <cs at zip.com.au>


More information about the Tutor mailing list