PYTHONPATH vs PATH?

  • Thread starter Michael Yanowitz
  • Start date
M

Michael Yanowitz

Hello:

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).

PYTHONPATH=.;..;DIRECTORY-CONTAINING-scenarios.py
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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

PYTHONPATH 8
PYTHONPATH in Windows 3
PYTHONPATH: dev and prod 7
PYTHONPATH var 1
PYTHONPATH and module names 6
Using PythonPath under Windows Vista. 3
PYTHONPATH 10
simple pythonpath query 3

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top