![]() $ cd ~/.wine/drive_c/Python27/Scripts/dist I package a Python script imported openpyxl, but encounter the issue ImportError: No module named openpyxl while running the Windows exculable. Troubleshooting 2.1 ImportError: No module named $ wine dist/HelloWorld.exeįixme:msvcrt:_clean_type_info_names_internal (0x1e24e5b8) stubĢ. The Windows executable file is located in dist/. $ wine ~/.wine/drive_c/Python27/Scripts/pyinstaller.exe -onefile HelloWorld.py ![]() # run `pyinstaller` under the same directory as Python scripts Package Python scripts (e.g., HelloWorld.py) with pyinstaller. Successfully installed pyinstaller-3.1.1 pypiwin32-219 $ wine python.exe Scripts/pip.exe install pyinstaller Step 2: Install PyInstaller on wine $ cd ~/.wine/drive_c/Python27 Choose the proper version from Download Python (for me, python-2.7.10.msi) and install it on wine by: $ wine msiexec /i python-2.7.10.msi /L*v log.txt Fortunately, newer Python versions already include pip. Note that python26 is installed, not including pip (is used to install pyinstaller). Build a Windows excutable on Ubuntu Step 1: Install wine and Python sudo apt-get install wine winetricks
0 Comments
Leave a Reply. |