forked from klim-/pyplane
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHowTo-Windows-Exe.txt
More file actions
33 lines (23 loc) · 1.19 KB
/
HowTo-Windows-Exe.txt
File metadata and controls
33 lines (23 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Instructions for building the Windows executable using PyInstaller 2.1:
Note: As of April 2016 PyInstaller 3.0 does not work properly
1. Make sure PyInstaller 2.1 is installed in your Python environment!
2. Open the file build_exe.py and adjust the directories if required.
3. Extremely important: Make sure that in main.py the line
sip.setapi('QVariant', 2)
is commented out:
#sip.setapi('QVariant', 2)
4. In your python installation locate the directory in which the
mpl_toolkits reside. Put an empty file named __init__.py into it
(e.g. c:\Progs32\WinPython-32bit-2.7.10.3\python-2.7.10\Lib\site-packages\mpl_toolkits\__init__.py)
5. Make sure that build_dir is not opened in any application or console, i.e.,
it can be deleted by the script.
6. Run build_exe.py
7. The resulting exe should be found in build_dir.
8. If some modules are not found after launching the exe you have to manually
import them using the --hidden-import option in build_exe. This can be
a time-consuming trial and error procedure.
9. Change the line
#sip.setapi('QVariant', 2)
in main.py to
sip.setapi('QVariant', 2)
to ensure that the application runs properly under native Python.