Detailed map traversal, teach you to master the complex gremlin query debugging method>>>
1. Press Alt + F12 in pychar to open the terminal dialog box
1.1 my project files are placed in the wxPython directory, D: learn, weather index insurance, wxPython > pyinstaller -F -w teaindex_ main.py
1.2 after running, the dist folder and build folder will be generated in the directory D: learn, weather index insurance and wxPython. My exe program is in the dist folder. Double click the EXE to pop up:
1.3 in the terminal dialog box again, run D: learn, weather index insurance, wxPython > pyinstaller -F -c teaindex_ Main.py, run exe, you can see the problem, the lack of module typedefs
You should use: pyinstaller – F – C demo.py. After packaging, click exe to execute the file. If an error is reported, it will be displayed on the console. This is, to prepare for the screenshot, because the console error is a flash
1.4 refer to online solutions
Change the packing code to:
D:\learn\Weather index insurance\wxpython> pyinstaller -F -c teaindex_ main.py –hidden-import sklearn.neighbors.typedefs
The problem is solved! The executable file is generated successfully
1.5 generate the program with icon D: learn, weather index insurance, wxPython > pyinstaller -F -w -i sunny.ico teaindex_ main.py –hidden-import sklearn.neighbors.typedefs
1.6 can find existing pyqt5 plugin directories when packaging. The specific screenshot is as follows
Solution:
Search pyqt5 with everything, find the pyqt5 folder under the path of/library/plugins, and copy the DLL Dynamic Library pyqt5qmlplugin.dll
According to the path of the error prompt, create a new folder one by one, and form the directory C:: (qt5b) QT_ 1524647842210\_ h_ Env library plugins, copy the DLL dynamic library just copied in
1.7 in addition to the above module, no module named ‘sklearn. Utils_ cython_ Blas’, add this module to the end, as shown below
pyinstaller -F -w teaindex_ main.py –hidden-import sklearn.neighbors.typedefs –hidden-import sklearn.utils._ cython_ blas
Similar Posts:
- Pyinstaller Package Error: failed to execute script main [How to Solve]
- Pycharm Error: ImportError: No module named model_selection
- The problem of: modulenotfoundererror: no module named ‘pyqt5’ appears in pychar using pyqt5
- No module named ‘sklearn.model_selection [How to Solve]
- How to Solve ModuleNotFoundError: No module named ‘sklearn.grid_search‘
- No module named ‘urllib.request’; ‘urllib’ is not a package
- ModuleNotFoundError: No module named ‘PyQt4’ [Spyder Import matplotlib Error]
- [Solved] ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.
- Python Error: “failed to execute pyi_rth_pkgres”
- [Solved] Pyinstaller package Error: AttributeError: ‘str’ object has no attribute ‘decode’