Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble with pip and py2exe
#1
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:~$
Reply
#2
Quote:RuntimeError: This package requires Python 3.3 or later
Are you running at least version 3.3 python?
Reply
#3
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
Reply
#4
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
Reply
#5
Did you install py2exe?  It doesn't come with python.
Reply
#6
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.
Reply
#7
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)
Reply
#8
(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.
Reply
#9
Do you mean the whole file or some lines(tell me please what lines I must delete)
Reply
#10
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Py2exe Writing UNKNOWN-0.0.0-py3.7.egg-info sarahroxon7 1 944 Apr-20-2022, 08:02 AM
Last Post: VadimCr
  Py2exe and pycryptodome reks2004 5 4,204 Dec-16-2020, 06:42 PM
Last Post: reks2004
  Py2exe Writing UNKNOWN-0.0.0-py3.7.egg-info Rickus 2 3,687 Feb-18-2020, 03:09 PM
Last Post: Rickus
  py2exe failed to compiled gahhon 9 7,541 Mar-04-2019, 03:29 AM
Last Post: gahhon
  py2exe keegan_010 4 4,520 Aug-22-2018, 07:58 AM
Last Post: buran
  How would I combine multiple .py files into one .exe with Py2Exe shlomi27 0 3,110 Aug-20-2018, 10:27 AM
Last Post: shlomi27
  jira-2.0.0.dist causing error with py2exe johnlawlor 1 2,529 Aug-09-2018, 08:27 PM
Last Post: Larz60+
  can not open .exe file generated by py2exe: ImportError: cannot import name _remove_d py2exe 0 2,758 May-22-2018, 09:57 AM
Last Post: py2exe
  Convert py2exe daltorya19 6 5,419 May-28-2017, 11:48 PM
Last Post: daltorya19
  Py2EXE: terminal window closes after pressing ENTER peanutbutterjelly 1 5,105 May-06-2017, 07:13 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020