Python Forum

Full Version: trouble with pip and py2exe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
please give a runnable sample of your code with the full error text or a clear description of the problem..I copied the game pong on my project ping, using Pycharm. In order to install py2exe, I had to install first "pip". After that I tried: pip install py2exe. here is the result:
  Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-mc6lbJ/py2exe/setup.py", line 10, in <module>
        raise RuntimeError("This package requires Python 3.3 or later")
    RuntimeError: This package requires Python 3.3 or later
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mc6lbJ/py2exe/
sylvain@sylvain-HP-Mini-110-1100:~$
Quote:RuntimeError: This package requires Python 3.3 or later
Are you running at least version 3.3 python?
After I run the project with ctrl+shift+F10, here is what I have:

Traceback (most recent call last):
  File "/home/sylvain/PycharmProjects/ping/setup.py", line 4, in <module>
    import py2exe #first name py2exe, py2.exe is bad too (No module named py2exe, or py2.exe
ImportError: No module named 'py2exe'
/usr/bin/python3.5 /home/sylvain/PycharmProjects/ping/setup.py     is at the beginning of the above. You can see the version 3.5
Do you have any other version of Python installed? If so make sure in the settings that Pycharm is set to use Python 3.X
Did you install py2exe?  It doesn't come with python.
Py2exe only work for 2.7 and 3.4 not 3.5
Quote:/usr/bin/python3.5
And why are you trying to use py2exe on Linux,it only work on Windows.

Cross platform and work for 3.5 Pyinstaller, CxFreeze.
As you see at the beginning of this thread, the installation of py2exe failed.

To Snippsat. Yes I am with Linux. What shall I do with the code ??
#setup.py
import os
import sys
import py2exe #first name py2exe, py2.exe is bad too (No module named py2exe, or py2.exe
from distutils.core import setup

origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
    dlls = ("libfreetype-6.dll", "libogg-0.dll", "sdl_ttf.dll")
    if os.path.basename(pathname).lower() in dlls:
        return 0
    return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL

sys.argv.append('py2exe')
setup(options={'py2exe': {'bundle_files': 1, 'compressed': True}},
      windows=[{'script': "game.py"}],
zipfile=None)
(Sep-15-2017, 06:33 PM)sylas Wrote: [ -> ]To Snippsat. Yes I am with Linux. What shall I do with the code ??
You shall not do anything with that code other than delete it,py2exe dos not work on Linux.
Do you mean the whole file or some lines(tell me please what lines I must delete)
Delete the whole file,dos not work on Linux should be clear.
You most use Cross platform tool that work on Linux that i linked to before.
Pages: 1 2