473,695 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does Python never add itself to the Windows path?

I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.

--
Ben Sizer

Dec 25 '06 #1
34 3956

Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.

--
Ben Sizer
excellent question

Dec 25 '06 #2
I don't seem to have any problem running python programs regardless of
where they are. My platform is windows xp and I have run both 2.4 and
2.5 more details about what version of windows you are running might be
helpfull

https://sourceforge.net/project/show...kage_id=174569

vbgunz wrote:
Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.

--
Ben Sizer

excellent question
Dec 25 '06 #3
MC
Hi!

+1

--
@-salutations

Michel Claveau
Dec 25 '06 #4
Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable.
Personally, I hate Windows applications that add themselves to the
PATH. So much crap gets put in there that I don't even use the default
system PATH and just set my own explicitly.
Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation.
If you're installing multiple versions of Python on one machine you're
going to have to do this anyways to ensure the version of Python you
want first in the path actually is first.
No such problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu.
Linux distributions normally install themselves somewhere that's
normally in the path already. I suppose you can do the same thing on
Windows if you want, just choose to install Python into directory
that's already in your path. Though installing to something like
C:\WINDOWS\SYST EM32 is probably not a good idea.

Ross Ridge

Dec 25 '06 #5
Er*********@msn .com wrote:
I don't seem to have any problem running python programs regardless of
where they are. My platform is windows xp and I have run both 2.4 and
2.5 more details about what version of windows you are running might be
helpfull
I don't think the Windows version is relevant. I did point out that
this happens across different incarnations of Windows (98SE and XP the
2 I have on hand to test), and that the problem wasn't specifically
about "running python programs". Basically if you go to a command
prompt and type "python", it won't do anything on a plain Python
install on Windows. Try it on Linux, and probably Mac too, and it'll do
something useful.

Similarly, if you install a Python package that adds to the scripts
directory, you can typically expect to run those scripts from the
command line without having to use the full path - not on Windows.

--
Ben Sizer

Dec 25 '06 #6
Ross Ridge wrote:
Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable.

Personally, I hate Windows applications that add themselves to the
PATH. So much crap gets put in there that I don't even use the default
system PATH and just set my own explicitly.
Personally I hate programs that ask to be installed to the root folder
of my hard drive, but Python suggests that as a default too. ;)

In an ideal world, Python should operate pretty much the same across
all platforms. Unfortunately, as it stands, you need to have different
instructions for running things on Windows. eg. The standard "python
setup.py install" invocation isn't going to do a damn thing unless
you've fixed up the path beforehand. The same goes for "python
ez_setup.py", another common favourite. The scripts directory is
important too: TurboGears installs a "tg-admin" script which you're
supposed to run from your project's directory: which on Windows means
you need to type something like "c:\python24\sc ripts\tg-admin" each
time. Half of the people who develop on Mac and Linux don't realise or
acknowledge this. and so the instructions for using their packages
don't work for the average person new to Python who probably just ran
the Windows installer program and thought that would suffice.
Linux distributions normally install themselves somewhere that's
normally in the path already. I suppose you can do the same thing on
Windows if you want, just choose to install Python into directory
that's already in your path. Though installing to something like
C:\WINDOWS\SYST EM32 is probably not a good idea.
The Windows way is typically to install things in Program Files and
then point things there as necessary. Installing it the Linux way would
just cause a different set of problems. Adding it to the PATH variable
is not going to cause problems for the vast majority of people, and
it's far easier to edit up the PATH to remove an entry you don't want,
than to move an installed program from one place to another.

--
Ben Sizer

Dec 25 '06 #7

Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.
Well, after Python is installed on a Windows platform, files with
extention ".py" or ".pyw" are automatically associated with python or
pythonw. If a python script is double-clicked or input something like
"sth.py" in the "cmd" box, the python interpreter is automatically
called. I don't see any proplem or inconvenience with this.

Dec 26 '06 #8

WaterWalk wrote:
Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.

Well, after Python is installed on a Windows platform, files with
extention ".py" or ".pyw" are automatically associated with python or
pythonw. If a python script is double-clicked or input something like
"sth.py" in the "cmd" box, the python interpreter is automatically
called. I don't see any proplem or inconvenience with this.
In the command line, entering "python" does not run the python
interpreter (unless you modify the settings yourself).

Dec 26 '06 #9
Ben Sizer wrote:
I've installed several different versions of Python across several
different versions of MS Windows, and not a single time was the Python
directory or the Scripts subdirectory added to the PATH environment
variable. Every time, I've had to go through and add this by hand, to
have something resembling a usable Python installation. No such
problems on Linux, whether it be Mandrake/Mandriva, Fedora Core, or
Kubuntu. So why is the Windows install half-crippled by default? I just
rediscovered this today when trying to run one of the Turbogears
scripts, but this has puzzled me for years now.
That would put together a great mix-up if app installations add to the PATH. Think of multiple installations etc.
( Note: this is also _NOT_ done on *nix - just a sym link is possibly put into /usr/local/bin or so )

To have something similar on Win I have a C:\bin folder where I put all my small .exe's / installations and all the start vectors (.exe, .bat's....).

The python.exe on Win is very small and just loads the pythonXX.dll. It also finds the right default DLL due to the version engraved in python.exe.
Thus I just copy the small python.exe from my favorite/default Python installation (2.3) into my C:\bin.
Thats probably next to what you obviously want - a "default link".
The Test&Fun-Pythons ( ... 2.2 2.4 2.5 2.6 ) - I have them renamed as e.g. python25.exe also in C:\bin . I make similar links on *nix also.

Perhaps in the future the Python Windows installer should create such pythonXX.exe "links" and maybe even a default python.exe (upon Checkbox in Installer!) into the Windows\system3 2 ?
Robert
Dec 26 '06 #10

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

Similar topics

2
8155
by: WIWA | last post by:
I'm looking for SNMP support in Python. I have found pySNMP, but I'm not sure whether this works under Windows as well. A few questions: 1) Where do I need to install the pySNMP files? 2) What do I have to do in order to be able to write somethin like: "from pysnmp import session" Thakns in advance for all input
23
1930
by: Spiffy | last post by:
hello, i'm fairly new to python programming and programming in general, but i have written a python prog that creates a MIDI file (.mid) and I want to be able to play it from another prog which is written in BASIC. It's a command-line prog that takes the MIDI filename as a parameter and plays the file. The 'Learning Python' book talks about using the os.system call, but I haven't been able to get this to work. How can I run this other...
8
3238
by: Jan Gregor | last post by:
Hello I run python script on another computer and want to "survive" that script after my logout. the script also uses drive mapping to network drive. Can you help me ? Or better is there some info for unix person how to survive with python on windows ;-) thanks, jan gregor
113
5273
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platform compatibility problems. So does M2Crypto. The built-in SSL support is weak. Even basic sockets don't quite work right; the socket module...
7
2324
by: jocago | last post by:
Good afternoon from someone who is trying to learn Python. I would like to launch an app from within a Python script. From the examples I have found, I should be able to do this with os.system. I use this: os.system("xplanet-1.2.0/xplanet.exe -fontsize 24 -label -target earth -lat 33.65 -lon -84.42 -radius 40 -num_times 1 -tmpdir .") This is copied directly from the .bat file that launches the xplanet app. It works there.
0
8617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9112
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8971
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8822
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8815
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7650
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4570
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.