pyinstaller

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

元气小坏坏 提交于 2020-07-06 19:31:34
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

不问归期 提交于 2020-07-06 19:30:45
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

烂漫一生 提交于 2020-07-06 19:29:22
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

Using pyinstaller with anaconda environment

折月煮酒 提交于 2020-07-05 11:40:08
问题 I have a very simple application made on python(v 3.6) , and I wanted to freeze it using pyinstaller.I have made the app using an environment created with anaconda, and I installed there the packages I needed(youtube_dl). I need help on how to use pyinstaller for my app(Main.py) using the environment I created with all its packages inside it. If I run "pyinstaller Main.py" I get this error: Traceback (most recent call last): File "Main.py", line 7, in <module> File "/Library/Frameworks/Python

PyInstaller “ValueError: source code string cannot contain null bytes”

情到浓时终转凉″ 提交于 2020-06-27 16:17:53
问题 I'm getting a ValueError: source code string cannot contain null bytes when executing a command pyinstaller main.py in a cmd both with and without administrator privileges. Traceback (most recent call last): File "c:\users\User\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\User\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\User

Pyinstaller executable fails importing torchvision

风格不统一 提交于 2020-06-27 08:29:10
问题 This is my main.py : import torchvision input("Press key") It runs correctly in the command line: python main.py I need an executable for windows. So I did : pyinstaller main.py But when I launched the main.exe , inside /dist/main I got this error: Traceback (most recent call last): File "main.py", line 1, in <module> ... (omitted) File "site-packages\torchvision\ops\misc.py", line 135, in <module> File "site-packages\torchvision\ops\misc.py", line 148, in FrozenBatchNorm2d File "site

Python Kivy packing to exe

允我心安 提交于 2020-06-26 07:56:15
问题 I am trying to packing kivy for windows. I am using windows 10 with python 3.7.2 with kivy 1.10.1. With the reference of this documentation I have done exe building successfully but when I run exe it shows the following error Error loading Python DLL 'C:\Users\acer\Desktop\coding\build\hello\python37.dll'. LoadLibrary: The specified module could not be found. Thanks for helping me :D and This is the Specs i got from python -m PyInstaller --name hello main.py hello.spec # -*- mode: python -*-

SDL2 Error: “Unable to load image <default.png>” when freezing kivy application using pyinstaller

我的梦境 提交于 2020-06-25 05:40:27
问题 I'm unable to produce a working exe with pyinstaller (the name of the app is settings_gui). Runtime error: (Full log) [WARNING ] [Image ] Unable to load image <<project_path>\dist\SETTIN~1\kivy_install\data\glsl\default.png> [CRITICAL ] [Window ] Unable to find any valuable Window provider at all! sdl2 - Exception: SDL2: Unable to load image File "site-packages\kivy\core\__init__.py", line 67, in core_select_lib File "site-packages\kivy\core\window\window_sdl2.py", line 138, in __init__ File

Error loading Python lib with PyInstaller on MacOS

主宰稳场 提交于 2020-06-25 04:45:12
问题 I am trying to package some python into an executable on MacOS (10.14.5). I am able to create the executable, but executing the resulting dist/hello_world executable gives the following error: [55240] Error loading Python lib '/var/folders/yh/6_6mb2y96kg0gnb_nh9r2zrr0000gp/T/_MEIwUMw4X/Python': dlopen: dlopen(/var/folders/yh/6_6mb2y96kg0gnb_nh9r2zrr0000gp/T/_MEIwUMw4X/Python, 10): no suitable image found. Did find: /var/folders/yh/6_6mb2y96kg0gnb_nh9r2zrr0000gp/T/_MEIwUMw4X/Python: code

pyinstaller on Windows with --noconsole simply won't work

坚强是说给别人听的谎言 提交于 2020-06-24 10:25:47
问题 I have a fairly simple GUI (wxPython) app and is working great. I'm using Windows 7. When compiling it using pyinstaller with -w (or --noconsole or --windowed ) and run it, I can see a console window for a millisecond and then it shutdown. The GUI app won't run. Compiling without the -w will produce a working app with a console window. What am I missing here? 回答1: I would guess that you are somehow launching a subprocess that gets messed up when Python runs without a console window. I have