Using the MSI installer on Windows: Setting PATH and Setuptools

C

cython

Hello All,

I really hate Windows, and I have only intermittent access to Windows machines right now.

When I install Python 2.7 on Windows using the MSI installer, it definitelydoes not modify the PATH variable. So I modify the PATH variable myself asfollows:

setx PATH %PATH%;C:\Python27\

Question 1: The command above requires a reboot in order to take effect, atleast on Windows 8. How do I make it take effect immediately? Maybe if I repeat the same command again with 'set' instead of 'setx'? Does 'set' affect the whole machine, or only the current CMD.EXE session?

Question 2: python-guide.org suggests adding C:\Python27\Scripts\ to the PATH as well. When is that necessary or helpful? If I forget to do that and have problems later, how can I tell the cause of the problems?

Question 3: Does the Windows MSI installer from Python.org include Setuptools? python-guide.org implies that it does not include Setuptools, but I have never needed to manually install Setuptools, I am always able to use easy_install right away. Is my memory warped, or perhaps tainted by old Python installs on the same machine?

Question 4: If the Windows MSI installer indeed lacks Setuptools, what is the best way to install it from the command line in a future-proof manner (on Windows)? I am imagining something like this:

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py

However, (1) wget is not a Windows command. What is the Windows command? And (2) is that URL the best possible URL? Or will that URL only download an old version, and there is a better URL for new versions?

Thank you,

Zak
 
S

Skip Montanaro

Question 4: If the Windows MSI installer indeed lacks Setuptools, what is the best way to install it from the command line in a future-proof manner (on Windows)? I am imagining something like this:
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py

However, (1) wget is not a Windows command. What is the Windows command? And (2) is that URL the best possible URL? Or will that URL only download an old version, and there is a better URL for new versions?

I am not a Windows person, but wouldn't pip do the trick?

https://pypi.python.org/pypi/pip/1.4.1

Skip
 
C

cython

I am not a Windows person, but wouldn't pip do the trick?

PIP would definitely do the trick. Does the MSI include PIP? If it does not include PIP, then how can I easily install it from the command line? I am looking for something like this:

wget https://pip.org/install/install_pip.py
python install_pip.py

This is totally theoretical. wget doesn't work, the URL is made up, and install_pip.py is a fantasy of mine. ez_setup.py DOES exist for Setuptools, which is why I am trying to use it.

Thank you,

Zak
 
S

Skip Montanaro

PIP would definitely do the trick. Does the MSI include PIP? If it does not include PIP, then how can I easily install it from the command line? I am looking for something like this:

Not yet, but I think just around the corner:

http://www.python.org/dev/peps/pep-0453/

Unlike most enhancements, this is proposed for inclusion in the next
micro releases of 2.7 and 3.3, not just in the next
normal-new-features-allowed version, 3.4.

Skip
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top