pyinstaller

How to package tensorflow with pyinstaller on MacOSX?

…衆ロ難τιáo~ 提交于 2020-01-02 07:30:13
问题 I am distributing a python program that contains tensorflow. On OSX, python 2.7, I have no errors loading libraries and running tensorflow. When using pyinstaller to create an executable it fails with a PBR error. We can reduce this problem down to a simple (hopefully reproducible) error. Here is our program. Let's just load tensorflow and have it print out some path info. tf_check.py import tensorflow print(tensorflow.__file__) Run with pyinstaller. Bens-MacBook-Pro:tests ben$ pyinstaller tf

What is sys._MEIPASS in Python

≡放荡痞女 提交于 2020-01-02 02:15:14
问题 What is sys._MEIPASS. What is the value of this variable and it's use ? I was a looking one python script but when I ran it on eclipse(pydev). It showing error. 回答1: sys._MEIPASS is a temporary folder for PyInstaller. See this question for more information. 回答2: If you want to disable the error Lint gives you in your editor (Eclipse, MS-Code, ...) add the following comment at end of your line: if getattr(sys, 'frozen', False): # Running as compiled running_dir = sys._MEIPASS + "/files/" #

PyInstaller not correctly importing pycrypto… sometimes

末鹿安然 提交于 2020-01-01 18:25:12
问题 I'm packaging a project with PyInstaller on different ubuntu machines. On some of them, when executing the generated project, it throws this error: File "~/PyInstaller-2.1/proj/build/proj/out00-PYZ.pyz/Crypto.Random", line 28, in ImportError: cannot import name OSRNG However the import works perfectly ok in python console and I can execute the project without packaging it. I've tried uninstalling and reinstalling pycrypto without success, I've also tried adding a specific from Crypto.Random

How to create a single executable file in windows 10 with scrapy and pyinstaller?

会有一股神秘感。 提交于 2020-01-01 18:20:50
问题 I have created a scrapy spider and successfully converted to windows executable using pyinstaller with disc folder. In order to do that, I have to make some slight changes in the scrapy site-packages and add those packages in the windows disc folder, it works perfectly, How can I make this into a single exe with the commented scrapy packages from the disc folder? I have already tried with --OneFile command in pyinstaller, but it shows the scrapy error? 回答1: Very similar issue discussed here:

Pyinstaller: Images fail to extract

纵然是瞬间 提交于 2020-01-01 15:53:03
问题 I run the build command and everything appears to build correctly until I try to launch the exe and this message pops up: Here is my spec file, I am not sure why it appears to be combing the file path with both images. block_cipher = None a = Analysis(['TripCalc.py'], pathex=['C:\\Users\\test\\Downloads\\TripApp'], binaries=[], datas=[('C:\\Users\\test\\Downloads\\TripApp\\BennySM.ico', 'C:\\Users\\test\\Downloads\\TripApp\\BgSM.gif')], hiddenimports=[], hookspath=[], runtime_hooks=[],

Pyinstaller distributing opencv from Windows 10 to Windows <10, missing ucrt dlls api-ms-win-crt

你离开我真会死。 提交于 2020-01-01 08:33:40
问题 I have a Python 3.5 64 bit program (required by tensorflow for Windows) that uses OpenCV. I am distributing it with pyinstaller. I built my program with Windows 10 /c/Python35/Scripts/pyinstaller -c DeepMeerkat.spec On my computer, the .exe builds and runs perfectly. On any other non-Windows 10 machine On import cv2 Returns ImportError: DLL load failed: The specified module could not be found. I can see a huge amount of discussion on this on pyInstaller thread, but I can't quite tell how to

Pyinstaller distributing opencv from Windows 10 to Windows <10, missing ucrt dlls api-ms-win-crt

天涯浪子 提交于 2020-01-01 08:33:11
问题 I have a Python 3.5 64 bit program (required by tensorflow for Windows) that uses OpenCV. I am distributing it with pyinstaller. I built my program with Windows 10 /c/Python35/Scripts/pyinstaller -c DeepMeerkat.spec On my computer, the .exe builds and runs perfectly. On any other non-Windows 10 machine On import cv2 Returns ImportError: DLL load failed: The specified module could not be found. I can see a huge amount of discussion on this on pyInstaller thread, but I can't quite tell how to

py2exe/pyinstaller and DispatchWithEvents

烈酒焚心 提交于 2020-01-01 07:01:11
问题 I have a program that uses the win32com library to control iTunes, but have been having some issues getting it to compile into an executable. The problem seems to revolve around using DispatchWithEvents instead of Dispatch . I've created a very simple program to illustrate my problem: import win32com.client win32com.client.gencache.is_readonly = False #From py2exe wiki class ITunesEvents(object): def __init__(self): self.comEnabled = True def OnCOMCallsDisabledEvent(self, reason): self

PyInstaller cannot find libpython2.7.so when making binary?

限于喜欢 提交于 2020-01-01 05:10:42
问题 I'm trying to make a binary version of a Python script using PyInstaller 2.0 on Linux. When I run: $ python pyinstaller.py myscript.py I get the error: 8907 INFO: Looking for Python library libpython2.7.so Traceback (most recent call last): ... File "pyinstaller.py", line 91, in <module> raise IOError("Python library not found!") IOError: Python library not found! How can this be fixed? I am using: Linux #98-Ubuntu x86_64 GNU/Linux With python 2.7. There are other Pythons on the system but I

Pyinstaller is not recognized as internal or external command

好久不见. 提交于 2020-01-01 03:26:06
问题 I am trying to use pyinstaller in cmd but I receive error: C:\Users\username>pyinstaller 'pyinstaller' is not recognized as an internal or external command, operable program or batch file. C:\Users\username> When I use this command in the Scripts folder in python , it works: C:\Users\username\AppData\Local\Programs\Python\Python36-32\Scripts>pyinstaller usage: pyinstaller [-h] [-v] [-D] [-F] [--specpath DIR] [-n NAME] [--add-data <SRC;DEST or SRC:DEST>] [--add-binary <SRC;DEST or SRC:DEST>] [