python setup.py install on Vista?

G

globalrev

type "python setup.py install"

that is used in most "addons" for python.

well using windows vista, where the h*** am i supposed to type this?

if it is not doable in windows, what do i have to do instead? just
clicking the setup.py-file never works.
 
K

Karl-Heinz Ruskowski

hi
well using windows vista, where the h*** am i supposed to type this?
you have to include the path to the python interpreter like this
c:\programs\python\python.exe pythonfile.py
(replace this with your path)
or you set an alias called python - i don't know how to that under windows,
especially visa :D

good luck

--
GPG key: 0x04B3BB96

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBICTO+EPvZ+gSzu5YRAp5LAJ9A+P79KZlvQ2/edJLmoAppmvX/JQCfWq0r
fD3wwhsNEMtjeTQrTSZu7OM=
=xbk5
-----END PGP SIGNATURE-----
 
P

Patrick Mullen

type "python setup.py install"

that is used in most "addons" for python.

well using windows vista, where the h*** am i supposed to type this?

if it is not doable in windows, what do i have to do instead? just
clicking the setup.py-file never works.

There are many problems with this on Vista. First, you need a command
prompt. You can go to "start menu->all programs->accessories->command
prompt" for this. But to install things in vista, you will likely
need to be an administrator, and windows won't automatically ask for
permission when typing "python setup.py install." So instead of
clicking on command prompt, right click it, and choose "run as
administrator". A faster way is to type "cmd" in the start menu
search area, and wait for "cmd.exe" to come up. Run that as
administrator.

Once you have a command prompt, you can "cd" into the directory where
you want to install the extension. Then, "c:\python25\python setup.py
install" should work. If you are using 2.4 or 3.0, it would be
"c:\python24\python" or "c:\python30\python" etc. If you installed
python somewhere other than the default folder, then you will need to
enter that path.

To make this process easier, when I want to install an extension, I
usually create a .bat file in the extension folder. Right click in
the folder and choose new->text file. Rename the file to
"install.bat". Right click the file and go to edit. Enter
"c:\python25\python setup.py install" into the file and save. Then
right click and choose run as administrator, and it should install.
You might add a "pause" line in the bat file as well, so that if it
has a problem installing, it will stay open so you can see the output.

Your best solution is to uninstall vista and use linux :)
 
S

Steve Holden

Patrick said:
There are many problems with this on Vista. First, you need a command
prompt. You can go to "start menu->all programs->accessories->command
prompt" for this. But to install things in vista, you will likely
need to be an administrator, and windows won't automatically ask for
permission when typing "python setup.py install." So instead of
clicking on command prompt, right click it, and choose "run as
administrator". A faster way is to type "cmd" in the start menu
search area, and wait for "cmd.exe" to come up. Run that as
administrator.

A quicker way to get an adminstrator command tool is to bring up the run
dialog with Windows-R, enter "cmd" then hit CTRL/SHIFT/Enter.
Once you have a command prompt, you can "cd" into the directory where
you want to install the extension. Then, "c:\python25\python setup.py
install" should work. If you are using 2.4 or 3.0, it would be
"c:\python24\python" or "c:\python30\python" etc. If you installed
python somewhere other than the default folder, then you will need to
enter that path.

To make this process easier, when I want to install an extension, I
usually create a .bat file in the extension folder. Right click in
the folder and choose new->text file. Rename the file to
"install.bat". Right click the file and go to edit. Enter
"c:\python25\python setup.py install" into the file and save. Then
right click and choose run as administrator, and it should install.
You might add a "pause" line in the bat file as well, so that if it
has a problem installing, it will stay open so you can see the output.

Your best solution is to uninstall vista and use linux :)

You're right, Vista's a pain.

regards
Steve
 
L

Lie

type "python setup.py install"

that is used in most "addons" for python.

well using windows vista, where the h*** am i supposed to type this?

if it is not doable in windows, what do i have to do instead? just
clicking the setup.py-file never works.

It seems that quite a lot of people wondered why python doesn't set
the environment variable to Python Path in the default installation.
While most Windows users that are flattered with GUI (IDLE) doesn't
really care about it, they'd have trouble when trying to run python
from command prompt.

To set your environment variable:
1. Right-click the Computer icon
2. Choose "Properties" from the context menu
3. Click the "Advanced system settings" link
4. Click the "Environment Variables" button
5. Add Python's installation path (usually C:\PythonXX where XX is the
Python version) to System Variables to the end of the path lists
6. Test it, try opening a command prompt and type "python" or "python
filename.py" outside Python installation directory
 
M

Martin v. Löwis

It seems that quite a lot of people wondered why python doesn't set
the environment variable to Python Path in the default installation.

For several reasons, one being that it's not needed. Just run setup.py
as a program, i.e. don't do

python setup.py install

but instead do

setup.py install

Regards,
Martin
 
L

Lie

For several reasons, one being that it's not needed. Just run setup.py
as a program, i.e. don't do

python setup.py install

but instead do

setup.py install

Regards,
Martin

who said it isn't needed:
1. I primarily set the EnvPath to invoke the interpreter in
interactive mode, without being intervened by IDLE ('cause IDLE is
extremely slow if you do a lot of print statements, most of the time
you won't notice it but if we do multitude of prints it might hang for
a second or two at every statement).
2. To avoid confusion with the rest of the world that uses python by
calling "python" in a shell-like interface (i.e. cmd).
3. Linux-people sometimes doesn't believe that there are Windows-
people that actually likes CLI, sometimes more than GUI.
4. Being such a great IDE, IDLE sometimes do odds and ends that it
sometimes DoS-ed me, having a quick, alternative way to be in touch
with python is a good thing, especially if you're being chased by a
deadline and moving focus away from the job to repair the tool is not
an option.
 

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top