470,831 Members | 1,481 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.



Someone on my team tried out installing my Python code and
found that setting PYTHONPATH does not work, but setting PATH
environment variable works the way PYTHONPATH should. Is that
how it supposed to be, or is that a bug or feature?

-----Original Message----- (parts deleted)
Subject: question on Python for windows

I ran into trouble getting our software to work with the debuggers
based on the user guide (updated after the CDROM).

Where DIRECTORY-CONTAINING-PYTHON-SCRIPTS.py is the directory containing
the Python scripts .

this actually is the PATH, not PYTHONPATH, and is correct if you
installed the Python scripts to the Python scripts folder, and then start
up from the Python scripts folder, which I would say is normally not
going to be the case.

I installed our software to C:\sp

I installed Python to E:\Python24 (the default is the same folder on C
drive, I just changed the drive letter)

when I installed the additional 3 packages they knew where Python was
already and all I did was pick the default choices.

but, the trouble was that the PYTHONPATH using . and .. does not find
the Python scripts folder if you are in C:\sp

I used this to make it work (based on Python in E:\Python24 and in C:\sp)

set PATH=%PATH%;E:\Python24;E:\Python24\Scripts

now I start in my C:\sp folder (where the config.txt file is) and
everything works fine

I did try just setting PYTHONPATH but it is actually PATH that matters.
If you don't include the Python base and Scripts folders in the PATH
it does not work. I verified that not setting PYTHONPATH but just set
PATH to include the Python base and scripts folders does work.

Thanks in advance:

May 8 '06 #1
0 1491

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Rami A. Kishek | last post: by
8 posts views Thread by Tero Pihlajakoski | last post: by
3 posts views Thread by D Denholm | last post: by
5 posts views Thread by pinkfloydhomer | last post: by
10 posts views Thread by sushant.sirsikar | last post: by
9 posts views Thread by Stef Mientki | last post: by
2 posts views Thread by Sergio Correia | last post: by
4 posts views Thread by mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post: by
1 post views Thread by Aljosa Mohorovic | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.