How do I set up Setuptools for Python 2.6 on Windows?

后端 未结 14 2279
温柔的废话
温柔的废话 2020-12-02 05:03

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 Setupt

相关标签:
14条回答
  • 2020-12-02 05:19

    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)
    
    0 讨论(0)
  • 2020-12-02 05:19

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

    0 讨论(0)
  • 2020-12-02 05:21

    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

    0 讨论(0)
  • 2020-12-02 05:22

    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.

    0 讨论(0)
  • 2020-12-02 05:23

    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 讨论(0)
  • 2020-12-02 05:28

    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.

    0 讨论(0)
提交回复
热议问题