scipy.interpolate
is working no problem on my Windows. Scipy is on PyInstaller’s list of packages which may require tight version control. I’m using:
python==3.7.7
PyInstaller==3.6
scipy==1.4.1
I also notice your using Anaconda which rearranges your package structures in a way PyInstaller often can’t follow which can lead to files/packages not being found.
Can you build in 1-dir mode (the default), navigate inside the dist folder and tell me if the scipy pyd files are in there? They should be under dist\your_program\scipy\interpolate
. Chances are they're not but it's a place to start.
Ughh - an inconsistent bug! Oh well at least it’s working.
As for your larger filesize - that is because of PyInstaller picking up optional dependencies and assuming you need them. The story usually goes:
scipy/optimize/_shgo_lib/triangulation.py
.)You can see this chain of inclusion in build/name/xref-name.html
. If those modules aren’t installed then they are ignored. This is why you’ll see the advise everywhere to use a clean minimal environment for PyInstaller. Alternatively you can --exclude
them. e.g. --exclude matplotlib --exclude PyQt5
. Sometimes you can even exclude subpackages such as --exclude scipy.integrate
. You can test if your script needs a package outside of PyInstaller by putting sys.modules["package_name"] = None
at the top of your script and seeing if it can still run normally. If you don't get an import error, it's usually safe to exclude.
I’d like to track down why your plain Python PyInstaller didn’t work - could you provide more details on that?
Brénainn
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/6be72ab4-0934-4ad3-a4cc-345808d9f2d4n%40googlegroups.com.
Thanks Chris for sharing that. It’s been a while since I used Anaconda.
Itsik, I tried from skimage.transform import warp’
on my plain Python and it’s worked fine. Could you give us the full traceback rather than a screenshot. If you find copying awkward in cmd you can pipe stderr to a file by appending > errors.txt 2>&1
to your command.
Freelancing does happen on here occasionally. You can post another question called Bounty $100 - please fix my PyInstaller program for me or something and you’ll probably get someone. Although we’d rather fix the problem permanently for everyone by either patching PyInstaller or writing a hook for a particular troublesome package. Then, if you’ve got cash you’re willing to throw around, the PyInstaller core team are always desperate for funding.
Brénainn,