473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PYTHONPATH vs PATH?

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:

May 8 '06 #1
0 1734

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rami A. Kishek | last post by:
Hi, I would really appreciate help on this from all ye Win-oriented people. I have been using python under Linux for quite a while, know little about windows. I just upgraded my Python on WinME...
8
by: Tero Pihlajakoski | last post by:
Hi, I've been experimenting on embedding Python to a C software, and ran into a little problem with PYTHONPATH (I'm running on linux). Here's the deal: When trying to call...
3
by: D Denholm | last post by:
I recently installed Python 2.2 on my WinXP box. I am having problems figuring out how to create the PYTHONPATH correctly. I went to the WinXP SystemProperties > Advanced > Environment...
5
by: pinkfloydhomer | last post by:
I have a Makefile target that uses a python script, like: %.abc: %.def python myscript.py The problem is that myscript.py and some modules that myscript.py imports are not in the current...
10
by: sushant.sirsikar | last post by:
Hi, I am using Linux env.I set the PYTHONPATH using import sys sys.path.append(----) But we i close python and start again i is not showing my new entry in PYTHONPATH. Can anyone help me to...
9
by: Stef Mientki | last post by:
Is it possible to change the searchpath for modules on the flight, under winXP ? Most preferred is some command to extend the searchpath. (the environment variable PYTHONPATH needs a reboot) ...
2
by: Sergio Correia | last post by:
Hi, I'm trying to add a personal folder to the path used by python in searching for packages and modules. This folder, "C:\docs\utils" , has some packages not yet ready for "site-packages". ...
4
by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post by:
I'm missing something major here. I'm trying to add a directory to my python path using the PYTHONPATH environment variable, and it's being ignored by the Python interactive shell. Below is a...
1
by: Aljosa Mohorovic | last post by:
i have a working MySQLdb module (/usr/lib/python2.4/site-packages/ MySQL_python-1.2.2-py2.4-linux-i686.egg), using it without problems. "clean shell" after login: python -c "import MySQLdb"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.