I've done some changes in the program, and it runs perfectly in PyCharm, the environment is:
- Python==3.6
- dicompylercore==0.5.4
- wxPython==4.0.6
- matplotlib==3.1.1(fix the 2d-views bug)
- numpy==1.16.4
- 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:
- Can anybody successfully package this program guide me on how to do it correctly?
- What's the environment used in the .exe on http://www.dicompyler.com/?
- 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.