Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later

65,751

Solution 1

It is missing from pypi, if you click on the 0.6.9 link it brings you to the 0.9.2.0 python 3 package, there seems to be no 0.6.9 package available to download.

Try using pip install http://sourceforge.net/projects/py2exe/files/latest/download?source=files

Solution 2

There is also a wheel of py2exe available for Python 2.x: py2exe_py2 0.6.9

You can do: pip install py2exe_py2

Pypi link.

Solution 3

I'm using Anacona, and I install py2.7 via its environments feature, so previous answers were not helpful to me.

--------------------------- Cannot install ---------------------------  
Python version 2.7 required, which was not found in the registry. 

The following is the command I used, it can install py2exe via command line.

pip install https://nchc.dl.sourceforge.net/project/py2exe/py2exe/0.6.9/py2exe-0.6.9.zip
...
Successfully installed py2exe-0.6.9

Cause py2exe requires Microsoft Visual C++ 9.0, so before installing, you should download and install it, by convenience, via this link

Hope this could be helpful, Thx.

Share:
65,751

Related videos on Youtube

Bruno Gelb
Author by

Bruno Gelb

Updated on March 04, 2020

Comments

  • Bruno Gelb
    Bruno Gelb about 4 years
    >>> python -c "import sys; print sys.version"
    2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
    
    >>> pip --version
    pip 1.5.5 from C:\Python27\lib\site-packages (python 2.7)
    
    >>> pip install py2exe
    <mumble grumble..>
    RuntimeError: This package requires Python 3.3 or later
    

    though official py2exe download page says they have exactly what I need:

    screenshot

    So how to install py2exe over pip?

  • Peter Parker
    Peter Parker about 7 years
    works for me .. seems the better solution than the accepted answer
  • Peter Parker
    Peter Parker about 7 years
    the question states to install via pip
  • Matt Warren
    Matt Warren about 7 years
    fails for me, the above cmd produces 'collecting py2exe py2exe-py2' (the underscore becomes hyphen) with the message, Could not find a version that satisfies the requirement py2exe-py2 (from versions: ) No matching distribution found for py2exe-py2
  • DavedeKoning
    DavedeKoning over 6 years
    Worked for me, I did have to install the Microsoft Visual C++ Compiler for Python 2.7 which it mentioned in the error message I got: error: Microsoft Visual C++ 9.0 is required. Get it from aka.ms/vcpython27
  • Peter
    Peter over 6 years
    I got the following exception from this - SSLError: hostname 'sourceforge.net' doesn't match u'*.sourceforge.net'
  • pupitetris
    pupitetris over 6 years
    Works for Python2.7 32 bits for Windows
  • Erik Knowles
    Erik Knowles over 5 years
    the op needs to install for python 2.7, not python3
  • tychon
    tychon about 5 years
    For those having issues, make sure you're trying from a 32-bit install of Python. This seemed to be the difference between success or not for me: default environment was choosing 64-bit python and pip and failing to find a compatible version.
  • Apostolos
    Apostolos over 4 years
    It worked for me too! Thanks. (After being through a lot of trouble until now with py2exe installation!) *** This should be the answer with the higher upvotes *** (Mine didn't change the situation!). But who says that life is fair? :)
  • qJake
    qJake about 4 years
    Was getting the same error via the GUI installer, and after installing VC++ 9 for Python via the provided link, this pip command worked for me. Thank you!