85

Is there any way to install Setuptools for Python 2.6 in Windows without having an exe installer?

There isn't one built at the moment, and the maintainer of Setuptools has stated that it will probably be a while before he'll get to it.

Does anyone know of a way to install it anyway?

Boann
  • 44,932
  • 13
  • 106
  • 138
corvuscorax
  • 5,570
  • 3
  • 28
  • 31
  • This question and answers seem to be obsolete. See https://pypi.python.org/pypi/setuptools/ – Evgeni Sergeev Aug 15 '13 at 11:16
  • Downright ancient. See http://stackoverflow.com/a/14407505/450917 for installing pip. The first half is setuptools, though you might as well install pip while you're at it. – Gringo Suave Nov 07 '13 at 06:43

14 Answers14

104

First Option - Online Installation (i.e. remaining connected to the Internet during the entire installation process):

  1. Download setuptools-0.6c9.tar.gz
  2. Use 7-zip to extract it to a folder(directory) outside your Windows Python installation folder
  3. Go the folder (refer step 2) and run ez_setup.py from the corresponding dos (command) prompt
  4. Ensure that your PATH includes the appropriate C:\Python2X\Scripts directory

Second Option:

  1. Download setuptools-0.6c9.tar.gz
  2. Download setuptools-0.6c9-py2.6.egg to a folder(directory) outside your Windows Python installation folder
  3. Use 7-zip to extract ez_setup.py in the same folder as setuptools-0.6c9-py2.6.egg
  4. Go to the corresponding dos prompt and run python ez_setup.py setuptools-0.6c9-py2.6.egg from the command prompt
  5. Ensure that your PATH includes the appropriate C:\Python2X\Scripts directory

Third Option (assuming that you have Visual Studio 2005 or MinGW on your machine)

  1. Download setuptools-0.6c9.tar.gz
  2. Use 7-zip to extract it to a folder(directory) outside your Windows Python installation folder
  3. Go the folder (refer step 2) and run python setup.py install from the corresponding dos (command) prompt

Please provide feedback.

Harsha J K
  • 141
  • 1
  • 15
bhadra
  • 12,601
  • 9
  • 52
  • 47
  • 1
    setuptools link is broken? should be http://pypi.python.org/pypi/setuptools/0.6c9 – Jason S Jul 09 '09 at 21:45
  • this is probably the most complete answer I've ever seen on SO. Here's the corrected link: http://pypi.python.org/pypi/setuptools – aronchick Aug 04 '09 at 17:39
  • This is awesome. Thank you. I can't understand why the setuptools project wouldn't just distribute a 2.6 win version – matt b Aug 27 '09 at 20:50
  • There has been an update to use python wheels over eggs. Use 7zip to extract the new file and you should still be able to get what you need. – James Oravec Mar 31 '14 at 15:35
  • on running setup.py getting error ImportError: No module named six.moves – Naveen Mar 19 '17 at 14:06
50

You could download and run http://peak.telecommunity.com/dist/ez_setup.py. This will download and install setuptools.

[update]

This script no longer works - the version of setuptools the it downloads is not at the URI specified in ez_setup.py -navigate to http://pypi.python.org/packages/2.7/s/setuptools/ for the latest version - the script also does some md5 checking, I haven't looked into it any further.

blank
  • 17,064
  • 19
  • 94
  • 151
Rod
  • 509
  • 3
  • 2
  • works great and everything is in C:\Python2X\Scripts directory – Ib33X Feb 18 '09 at 12:48
  • 3
    Needless to say that HTTP_PROXY env variable must be set in case of connecting through a proxy – fglez May 27 '09 at 10:45
  • 2
    Just to detail a bit: 1. Download http://peak.telecommunity.com/dist/ez_setup.py 2. Double click it if Python is associated to *.py files, or execute "python ez_setup.py" for the command-prompt for a portable Python for example) 3. Done, typing "easy_install" command should now work. – Wernight Jan 14 '10 at 09:22
10

The Nov. 21 answer didn't work for me. I got it working on my 64 bit Vista machine by following the Method 1 instructions, except for Step 3 I typed:

setup.py install

So, in summary, I did:

  1. Download setuptools-0.6c9.tar.gz
  2. Use 7-zip to extract it to a folder (directory) outside your Windows Python installation folder
  3. At a DOS (command) prompt, cd to your the newly created setuptools-0.6c9 folder and type "setup.py install" (without the quotes).
  4. Ensure that your PATH includes the appropriate C:\Python2X\Scripts directory
6

I'm able to find the EXE doing google,

you can simply download it from following URL, and double click and install....

http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11.win32-py2.6.exe#md5=1509752c3c2e64b5d0f9589aafe053dc

shahjapan
  • 11,781
  • 21
  • 66
  • 98
  • 3
    Of course, that file was uploaded just a few weeks before you found it, and a full year after the OP wanted it. Nevertheless, it is now the best option, imo. – Xiong Chiamiov Jun 20 '10 at 18:26
5

I got it working quickly by downloading the source and then running (from the extracted directory):

python.exe setup.py bdist_wininst

That builds dist\setuptools-0.6c9.win32.exe, which is exactly the installer you're looking for.

will-mvn
  • 649
  • 1
  • 6
  • 10
2

Just installed setuptools as follows:

  1. Downloaded http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e , and extracted to a folder outside of my Python installation.
  2. command prompt, then cd into that folder.
  3. enter python setup.py install

That will install from the source into your python's site-packages folder and any other steps needed. This was on Windows XP SP2.

NathanD
  • 7,611
  • 7
  • 28
  • 26
1

setuptools has been updated in version 0.6c11.

Giacomo1968
  • 23,903
  • 10
  • 59
  • 92
Tommy B
  • 189
  • 2
  • 8
1

The easiest setuptools installation option is to use the pre-packaged Windows Installer.

for 32-bit Python on Windows, the official setuptools page has been updated and has windows installers for Python 2.6 and 2.7:

for 64-bit Python on Windows, setuptools Windows installers are available here:

Corey Goldberg
  • 53,391
  • 24
  • 118
  • 137
1

The "first option" (4 steps: download, extract, run, verify PATH) didn't work on my Windows Server 2008 x64 machine with Python 2.6 32 bit installed, nor did it work on my Vista x64 machine with Python 2.6 32 bit installed.

The "second option (5 steps: download, extract, extract, run, verify PATH) worked on both Windows Server 2008 x64 and on Windows Vista x64.

Thanks a bunch for providing the instructions!

user76143
  • 41
  • 2
1

OP option 1 did not work for me.

However doing setup.py install as mentioned by NathanD did do the trick.

Maybe that should become option 1?

Werner

0

Python has everything on board to do this.

from https://pypi.python.org/pypi/setuptools#installing-and-using-setuptools I got the URL to the ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

instead downloading it and fiddling with the file we can do this from the console:

import urllib
url = 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py'
ezcode = urllib.urlopen(url).read()
exec(ezcode)
ewerybody
  • 1,016
  • 11
  • 25
0

My advice is to wait until Python 2.6.2 to use Python 2.6 on Windows. There are still some bugs that make it less than ideal (this one is particularly nasty). Personally, I wasn't able to get setuptools working totally well on Vista x64 even after installing from source. Under Python 2.5.4, I haven't had any problems though.

Jason Baker
  • 171,942
  • 122
  • 354
  • 501
0

Second option worked for me.

Two notes:

a. After installing, when you using easy_install in vista, do so as administrator. (Right click on your command line shortcut and click "run as administrator"). I had trouble trying to run easy_install without doing that.

b. He means use ez_setup from setuptools-0.6c9.tar.gz

  • addition: if you can't give the permission. just copy the .py file and easy_install.exe to a temp directory and run it there. – Özgür May 11 '10 at 17:54
-1

ActivePython already includes setuptools (Distribute actually), along with pip and virtualenv.

Sridhar Ratnakumar
  • 68,948
  • 61
  • 139
  • 172