Setting PYTHONPATH for Scite?

729 views
Skip to first unread message

John Salerno

unread,
May 20, 2008, 8:55:22 PM5/20/08
to scite-interest
Whenever I try to run a program from Scite (F5) while the file is
within my Python directories (on Windows), it works. But when I move
the file to a different folder I get an error saying it can't find the
file. I created the PYTHONPATH environment variable and added the
directory to it, but it still doesn't seem to work. Is there something
else to do to get Scite to find it? Or is this a Python issue?

Thanks.

Jérémie Lumbroso

unread,
May 21, 2008, 12:38:56 PM5/21/08
to scite-interest
Hello,

I apologize for the dimwitted question: I'm not sure I understand how
SciTE runs your program/Python script, but have you tried adding the
path to your Python interpreter to the PATH environment variable, by
editing the system settings? (As explained here:
http://www.computerhope.com/issues/ch000549.htm)

John Salerno

unread,
May 21, 2008, 5:47:17 PM5/21/08
to scite-interest
I haven't tried that yet, but it was my understanding that PATH was
used for something else. I might also be mistaken about the proper use
of PYTHONPATH as well.

On May 21, 12:38 pm, Jérémie Lumbroso <jeremie.lumbr...@gmail.com>
wrote:

Fred Lionetti

unread,
May 21, 2008, 6:02:48 PM5/21/08
to scite-i...@googlegroups.com
Hi John,

PATH is used to indicate where to look for programs. So if your PATH
includes C:/python25/ (if you are using python2.5) then python will be
available from any directory

PYTHONPATH on the other hand tells python (and not other programs)
where to look for packages during import.

-Fred

Neil Hodgson

unread,
May 22, 2008, 6:02:20 AM5/22/08
to scite-i...@googlegroups.com
> But when I move
> the file to a different folder I get an error saying it can't find the
> file.

You should show the exact error message along with the path of the file.

Neil

John Salerno

unread,
May 24, 2008, 3:55:54 PM5/24/08
to scite-interest
I tried adding C:\Python25\ to my PATH variable, but I still get the
following message when trying to run a file:

>pythonw -u "test.py"
>The system cannot find the file specified.

I don't understand what else I might need to do. It worked normally on
Ubuntu, without any changes. I'm using the same user properties file
on Windows, so nothing in there would be different, AFAIK.


On May 21, 6:02 pm, "Fred Lionetti" <flione...@gmail.com> wrote:
> Hi John,
>
> PATH is used to indicate where to look for programs. So if your PATH
> includes C:/python25/ (if you are using python2.5) then python will be
> available from any directory
>
> PYTHONPATH on the other hand tells python (and not other programs)
> where to look for packages during import.
>
> -Fred
>

John Salerno

unread,
May 24, 2008, 3:57:27 PM5/24/08
to scite-interest
Oh sorry, the path of the file is:

C:\Documents and Settings\John Salerno\My Documents\My Scripts

and I added that to my PATH variable, but I get the above error
message.

Neil Hodgson

unread,
May 25, 2008, 1:22:32 AM5/25/08
to scite-i...@googlegroups.com
Did you restart SciTE after setting the path? Does "pythonw --help"
work from a command prompt?

Neil

Reply all
Reply to author
Forward
0 new messages