Have some problems while converting .py to .exe

33 views
Skip to first unread message

Alcurd Axl

unread,
Jul 26, 2019, 12:05:25 AM7/26/19
to dicompyler
I've done some changes in the program, and it runs perfectly in PyCharm, the environment is:
  1. Python==3.6
  2. dicompylercore==0.5.4
  3. wxPython==4.0.6
  4. matplotlib==3.1.1(fix the 2d-views bug)
  5.  numpy==1.16.4
  6. pyinstaller==3.4
After I tried to use pyinstaller to package the dicompyler_app.py, and move the resources folder to the dist folder, the .exe always close immediately. (BTW, I've fixed the pubsub's bug already)
So, I open the .exe in cmd, I got the message below:
   
C:\Users\27246\Desktop\Dicom\dicompyler-3views\dist\dicompyler_app\wx\lib\pubsub\__init__.py:25: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
C
:\Users\27246\Anaconda3\envs\DicomPyler\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:627: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
 
exec(bytecode, module.__dict__)

I have no idea what can I do to make the .exe to run perfectly with pyinstaller, so I turn to py2exe, which is mentioned in wxpython's official documentation, but unfortunately, py2exe only supports python 3.4 or below. 
So here are my questions:
  1. Can anybody successfully package this program guide me on how to do it correctly?
  2. What's the environment used in the .exe on http://www.dicompyler.com/?
  3. What's the meaning of setup.py in the main folder?
Really appreciate if anybody can help me.
If any details aren't described precisely I will try to make it more clear.
Reply all
Reply to author
Forward
0 new messages