#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0

    Unknown Distribution Option 'windows'


    Plz, I'm new to py programming and wanted to compile a py project with py2exe. It requires also wxpythonwin to compile.
    But always when I try, I get the following error:
    Unknown Distribution Option 'windows'.

    Does anyone know what this error is?

    Thnx for any help, bye,
    Max
    Last edited by Pepsmax; May 21st, 2004 at 04:59 PM.
  2. #2
  3. Only the strong survives!!.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Feb 2003
    Location
    A World of wonders.
    Posts
    5,583
    Rep Power
    407
    Originally Posted by Pepsmax
    Plz, I'm new to py programming and wanted to compile a py project with py2exe. It requires also wxpythonwin to compile.
    But always when I try, I get the following error:
    Unknown Distribution Option 'windows'.

    Does anyone know what this error is?

    Thnx for any help, bye,
    Max
    I dont think you need wxPythonwin to compile it in to exe file.. how is your setup.py and how are you tring to compile it?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    Hi!Thnx for your answer!
    It's a Bittorrent Client and the instructions in build.windows.txt say to install wx and py2exe.
    This is how I tried:
    python winsetup.py py2exe

    winsetup.py:
    from distutils.core import setup
    import py2exe

    setup(
    windows = [ { 'script': 'btdownloadgui.py',
    'icon_resources': [ (1, 'icon_bt.ico')],
    'excludes': ["pywin", "pywin.debugger", "pywin.debugger.dbgcon",
    "pywin.dialogs", "pywin.dialogs.list",
    "Tkconstants","Tkinter","tcl" ] } ]
    )
  6. #4
  7. Only the strong survives!!.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Feb 2003
    Location
    A World of wonders.
    Posts
    5,583
    Rep Power
    407
    try just calling it this way
    Code:
    from distutils.core import setup
    
    import py2exe
          
    setup(windows=["path/to/btdownloadgui.py"],
             icon_resources=[ (1, 'icon_bt.ico')])
    not sure if it will work but you can try it out
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    Thnx for your answer!
    But it hasn't improved anything.. I get even more errors:
    c:\python22\lib\distutils\dist.py:215: UserWarning: Unknown distribution option
    'windows'
    warnings.warn(msg)
    c:\python22\lib\distutils\dist.py:215: UserWarning: Unknown distribution option
    'icon_resources'
    warnings.warn(msg)
    running py2exe
    Traceback (most recent call last):
    File "winsetup.py", line 11, in ?
    icon_resources=[ (1, 'icon_bt.ico')])
    File "c:\python22\lib\distutils\core.py", line 138, in setup
    dist.run_commands()
    File "c:\python22\lib\distutils\dist.py", line 902, in run_commands
    self.run_command(cmd)
    File "c:\python22\lib\distutils\dist.py", line 922, in run_command
    cmd_obj.run()
    File "C:\Python22\Lib\site-packages\py2exe\build_exe.py", line 369, in run
    raise DistutilsError, "Nothing to do"
    distutils.errors.DistutilsError: Nothing to do

    Shiiit.. maybe any of the componentes wxpathonwin, py2exe or python itself weren'Ät installed correctly?
    I mean this openSource python Project is supposed to compile this way, but it doesn't work..
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I dout this is a major problem with Python - 8 outa 10 times its something simple . Maybe you could give us a little info about your system... Python version and where you got it, Py2exe version, Platform type and version the usual stuff.

    In the mean time you might want to try a reinstall and see if that helps any

    Mark.
    programming language development: www.netytan.com – Hula

  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    What version of py2exe are you using? I believe that the interface has changed in the most recent version. I have used version 0.5.0 to create a wxPython app with a win32all COM client, with no problems.

    I also note that you are using Python 2.2. Py2exe version 0.5.0 requires Python 2.3, since it uses the zipimport feature. I don't know if this is related to the problems you are having.

    Dave - The Developers' Coach
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    Hi!

    Thnx for trying to help me!

    It's strange.. I'm using py2exe for python22 and wxpython for python22..
    hmm I'll try to get an even older version of these components.. I hope that sourceforge are still hosting these files.. if not.. do you know where to get them maybe?

    Thnx!
  16. #9
  17. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    As Dave mentioned, there have been some major changes with the current release of Py2exe, as such the way you use Py2exe has changed i.e. the options available have been more or less totaly reworked! You probably need to hunt around for some of the older examples/doc's and it should work fine.

    Your best bet would peobably be to either update your Python and Py2exe versions (Python 2.3.4 should be out around the 27th).

    Or

    You can search this forum since there should be some threads dealing with the older Py2exe which might help. This seems to be the problem IMO since the windows option really doesn't exist for you .

    Happy hunting.

    Mark.
    programming language development: www.netytan.com – Hula

  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    Thnx for your kind help!
    I'll hunt for that version

    Bye
  20. #11
  21. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Not a problem, gald to help out!
    programming language development: www.netytan.com – Hula

  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    Hmm..
    I went to sourceforge and tried to get all components for python version 2.0x, but they didn't host the "old" wxpython files for version2.0x, so I downloaded Python 2.13 and got py2exe for python2.1 and wxpython for 2.1
    uninstalled the previous versions of these components and installed the new older ones..

    But nothing changed.. I still get the same error message

    What does this actually mean?Are there different packages for different OS versions etc, and the one for "windows" is missing or what?

    Thnx for any further help
  24. #13
  25. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Probably your best bet then would be to just get Python 2.3.3 and the current versions of each package and try it again since back tracking obviously doesnt want to work this time.

    In any case there are a lot of other advantages that Python 2.3 can offer you, seriously woth the upgrade! Is there any reason why you don't want to do this?

    Mark.
    programming language development: www.netytan.com – Hula

  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    I thought it would only work with older versions..
    Thnx!!Now it compiles and no errors anymore..
    thnx a lot!

    Have a nice weekend!
    Bye

IMN logo majestic logo threadwatch logo seochat tools logo