Re: [PyInstaller] Loading External DLLs at Runtime

2019-06-09 Thread Eric Fahlgren
Ben, I think we're doing exactly that in our code. Exactly when are you setting PATH? Do you use the runtime_hooks in your .spec file to point to a boot file, so it happens as part of initialization of the product exe? XXX.spec contains (among all the other stuff): analyzed = Analysis(

Re: [PyInstaller] Loading External DLLs at Runtime

2019-06-13 Thread Eric Fahlgren
uggestion, I tried using a runtime_hook to point to a boot > file, and I set os.environ["PATH"] in the boot file. I still have the same > issue. > > On Sunday, June 9, 2019 at 9:21:15 AM UTC-4, Eric Fahlgren wrote: >> >> Ben, I think we're doing exactly that in o

Re: [PyInstaller] No module named 'packaging.specifiers' (resolved)

2019-06-19 Thread Eric Fahlgren
Since you mention Py 3.7 specifically, I'm just curious as to how much of this you feel relates to Py 3.7? When I moved from 3.6.3 to 3.7.1 last October, it was pretty much painless, but we're using wxPython for gui and it has been very stable in this regard for years. Most of my PyInstaller

Re: [PyInstaller] Having some troubles, but its not app breaking

2019-05-09 Thread Eric Fahlgren
Cody, the issue is dependencies. You as a human look at the installation and can say, "Hey, that isn't used," but PyInstaller is not as smart and sees a big library like PIL or django and has to assume that anything in those libraries that is possibly connected must be included. To make up an

Re: [PyInstaller] Pyinstaller can not find scipy.special._ufuncs on another computer

2019-05-08 Thread Eric Fahlgren
Just a wild guess, but could it be another library that _ufuncs...pyd depends on? I had a case a couple years ago with numpy where it had its own version of tbb.dll (used by some pyd), and the system one was a different version and that produced very similar symptoms. On Tue, May 7, 2019 at

Re: [PyInstaller] No module named 'packaging.specifiers' (resolved)

2019-06-30 Thread Eric Fahlgren
3.7.3. I >> got some "Security-Alert: try to store file outside of dist-directory" >> error. Switched to Python 3.6.8 (thanks to pyenv) and PyInstaller was able >> to package up the app. >> >> Not sure why the version of Python makes much of a difference w

Re: [PyInstaller] No module named 'packaging.specifiers' (resolved)

2019-06-30 Thread Eric Fahlgren
nd PyInstaller was able > to package up the app. > > Not sure why the version of Python makes much of a difference with > PyInstaller, but it sure seems to. > > Randy > > On Wednesday, June 19, 2019 at 10:11:06 AM UTC-6, Eric Fahlgren wrote: >> >> Since you mention

Re: [PyInstaller] Problem using numpy and pyinstaller

2019-07-16 Thread Eric Fahlgren
Looking in the source on github, it looks like that was fixed last October. I think you need to update that hook file. The "for" loop in my version is at line 40, not line 34... On Tue, Jul 16, 2019 at 2:38 AM Jose Casas wrote: > Hello, > > I am using pysinstaller very last version:

[PyInstaller] Use of VersionInfo with PyInstaller 3.5

2019-07-10 Thread Eric Fahlgren
Our spec files have always created a VersionInfo struct on the fly and passed that as the value for 'version' to the EXE: >>> from install.pi_utils import create_version_info >>> version_info = create_version_info(exe_name, prod_name='JobScheduler') >>> >>> exe = EXE( >>> ... >>>

Re: [PyInstaller] Bokeh v2.0.0 fails with PyInstaller

2020-03-11 Thread Eric Fahlgren
From dumping out some 'datas' values, it looks like it's simply a list of tuples: [(src, dst), (src, dst), ...] So, you should be able to add something like this to the hook: import os from PyInstaller.utils.hooks import get_module_file_attribute src =

Re: [PyInstaller] Concurrent pyinstaller builds

2020-03-09 Thread Eric Fahlgren
The best solution right now appears to be "re-run the build..." https://github.com/pyinstaller/pyinstaller/issues/3809 I've tried to find the root cause, but it's so spurious as to be impossible. If you can find a way to reliably reproduce the issue (I have not been able to), I'm sure someone

Re: [PyInstaller] Mac Error Unknown Mach-O header with DLLs

2020-04-15 Thread Eric Fahlgren
I'd first try adding 'nvdaControllerClient64' to the excludes and see if that does anything. I suspect it will just chase back to another error, but maybe chase them all back until you've trimmed the tree of pyd/dll/so files that are causing the issue? On Tue, Apr 14, 2020 at 9:23 AM Timothy

Re: [PyInstaller] Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

2020-04-10 Thread Eric Fahlgren
PyInstaller v 3.1 is over four years old, so not too surprising that this option is missing. Update your installation, "pip install --upgrade pyinstaller" and it should appear. On Fri, Apr 10, 2020 at 8:55 AM ttepperg wrote: > Hi, > > I'm finding a related problem. > > Pyinstaller v3.1 on Mac

Re: [PyInstaller] Re: How do I specify a custom output direcory

2020-04-04 Thread Eric Fahlgren
Did you try 'pyinstaller -h'? I see: --distpath DIRWhere to put the bundled app (default: .\dist) --workpath WORKPATH Where to put all the temporary work files, .log, .pyz and etc. (default: .\build) On Sat, Apr 4, 2020 at 2:14 AM Rob V wrote: > So there

Re: [PyInstaller] Re: Is there any way to specify which modules to import?

2020-03-27 Thread Eric Fahlgren
But that's basically what you are doing by feeding PyInstaller your script. PyInstaller scans your source for imports and only includes what it finds by searching the dependencies exhaustively. I'm guessing if you try to do this manually, you are going to run into grief pretty quickly as it's a

Re: [PyInstaller] Re: Is there any way to specify which modules to import?

2020-03-29 Thread Eric Fahlgren
On my system (Win 10 Pro 64, Py 3.8.1) numpy itself is almost all of that and SciPy 1.5x that, again. Throw in Qt and I'm surprised you're not well over 100 meg. Our installer is over 350 Mb with numpy, scipy, wx and vtk... Just because you don't use something directly doesn't mean it's not

Re: [PyInstaller] Re: Is there any way to specify which modules to import?

2020-03-29 Thread Eric Fahlgren
u may not be using all of numpy, but it's really hard to tease out what > you are really using mostly it doesn't matter: disk space is really cheap > these days. Bandwidth not always, but still, folks are used to big > downloads. > > -CHB > > > On Sun, Mar 29, 2020 at 8:21 AM Eric F

Re: [PyInstaller] My application works fine but I would like to understand why

2021-01-13 Thread Eric Fahlgren
My old standby for debugging this sort of thing is the venerable https://dependencywalker.com/ (which still works fine, if a little slow, on Win 10). Try popping it up on your .exe and see if you can find your module there. Right click on the file list and you can toggle "Full Paths" and see

Re: [PyInstaller] My application works fine but I would like to understand why

2021-01-12 Thread Eric Fahlgren
Have you tried installing and running on another machine, which does not have your module installed? Could be leaking in through system path or something if you're testing on your development machine. On Tue, Jan 12, 2021 at 8:57 AM Sylvain Berger wrote: > I am packaging a Qt window

Re: [PyInstaller] Re: Exe Not working on different PCs

2021-05-22 Thread Eric Fahlgren
Have you ever used the venerable Dependency Walker? It's ancient, but it still works for me on Win 10, although it sometimes takes 5-10 minutes to start up these days. Since it's just two files (depends.exe and depends.dll, the .chm is just help so you can ignore it), you can easily put it on a

Re: [PyInstaller] Collected data files during analysis are not part of binary

2022-03-16 Thread Eric Fahlgren
'collect_all' simply locates the items, putting that information into its return values. 'datas' should then be used in 'EXE' to include them into a one-file, or be provided as an argument to 'COLLECT' for a one-dir. It's easiest to see by just writing a hello-world and running 'pyinstaller

Re: [PyInstaller] Re: Pyinstaller to create windows .exe does not yield specified icon.

2022-03-09 Thread Eric Fahlgren
As Edward says, should be in EXE not the BUNDLE/COLLECT of your .spec. I've always used absolute paths: icon = os.path.join(BUILD_ROOT, 'gui/resources/app.ico'), where BUILD_ROOT is something like "c:/my/build". When I run Image Magick (magick identify ...) on the icon file, I get the

Re: [PyInstaller] Re: pyinstaller gets wrong spec file

2022-03-23 Thread Eric Fahlgren
Did the original wrong command overwrite 'myfile.spec', and leave a '$' in there? Check in myfile.spec first, I don't know of any other file written by pyinstaller (other than the obvious stuff in build/ and dist/). On Wed, Mar 23, 2022 at 3:30 AM Jean-Luc Bellier wrote: > > Hello > > For your

Re: [PyInstaller] Re: Created .exe cannot be opened when moved to a new directory

2022-02-08 Thread Eric Fahlgren
On Mon, Feb 7, 2022 at 7:48 AM Paul Fishback wrote: > So, following the steps at > https://pyinstaller.readthedocs.io/en/stable/spec-files.html, I could add > the run time option -F,--onefile in my spec file by defining > > options=[('F' ,None,'OPTION')] > > and including this as a parameter of

Re: [PyInstaller] Re: Issue after creating .exe while using wexpect within the script

2022-01-20 Thread Eric Fahlgren
Once you've got a pile of files that need to be moved to other machine en masse, you're out of PyInstaller's domain. You need to look at NSIS or MSI or Inno Setup or one of the other packages that put all those files into an installer that can then be shipped to end users. I've used all three of

Re: [PyInstaller] Django Pyinstaller

2022-08-30 Thread Eric Fahlgren
So, from the '.exe' I'm assuming a Windows environment? If so, you have a couple ways to do this. You can create a Windows shortcut to the executable that contains those arguments, the shortcut's "Target" would look exactly like your specified command line. On the other hand, you can add an (or

Re: [PyInstaller] ModuleNotFoundError: traceback

2023-03-15 Thread Eric Fahlgren
Even if a module is in the stdlib, it might not be included if it is not referenced somewhere (pyinstaller attempts to make the resulting binary as small as possible by only including what is needed). That appears to be the case here, so '--hidden-import' is a likely solution. Try pyinstaller

Re: [PyInstaller] ModuleNotFoundError: traceback

2023-03-16 Thread Eric Fahlgren
all the files in the dist/ directory at all... pyinstall --onefile entrypoint.py On Wed, Mar 15, 2023 at 10:10 AM Xavier Nunn wrote: > Thank you for the quick reply! > > Sadly, no luck, this doesn’t change the result, I get the same exact error. > > Xavier > > Le 15 ma

Re: [PyInstaller] Problem using anyascii

2023-03-01 Thread Eric Fahlgren
Hi Julie, Looking at the source for anyascii, it uses importlib.resources to grab those binaries, so I think it should be able to just grab them as you're trying to do (if it anyascii were just doing "open...read", that would probably result in some different strategy being needed). In any case,

Re: [PyInstaller] ValueError: Unable to configure formatter 'default'

2023-04-26 Thread Eric Fahlgren
Steve, That seems common and broad enough that you should consider adding a wiki page for it... https://github.com/pyinstaller/pyinstaller/wiki/Recipes Eric On Tue, Apr 25, 2023 at 10:42 PM Steve Barnes wrote: > Hi Alisha, > > > > I have seen this problem before and eventually figured out the