Pyinstaller can not find scipy.special._ufuncs on another computer

15 views
Skip to first unread message

pje...@biociphers.org

unread,
May 7, 2019, 3:22:30 PM5/7/19
to PyInstaller

I am trying to get setup with a easily distributable python program which happens to use scipy. I have two windows 10 64 bit virtual machines. On one I have installed the dependencies for my program, and it runs correctly. Additionally I have installed pyinstaller and performed a freeze. The program runs correctly as the building user on the first VM, as well as a new user on the first VM. The issue is that I get a error loading dll on the second VM, which I just spun up as a test.


Screenshot from 2019-04-22 17-35-15.png


I attempted to find all imports from scipy and include them as hidden imports. I also included the scipy "extra dll".

pyinstaller --windowed --icon="%SCRIPT_FOLDER%\res\icon.ico" --hidden-import=numpy --hidden-import=scipy._lib._util --hidden-import=scipy.special._ufuncs --hidden-import=scipy --hidden-import=scipy.stats --hidden-import=scipy.interpolate --hidden-import=scipy.special --hidden-import=scipy.cluster.hierarchy --paths C:\Users\User\AppData\Local\Programs\Python\Python37\Lib\site-packages\scipy\extra-dll --workpath "%WORK_FOLDER%" --distpath "%OUTPUT_FOLDER%" "%SCRIPT_FOLDER%\..\something.py" -n something

Also, I can see the referenced dll files in the correct spot in the frozen output folder under scipy/special there are _ufuncs.cp37-win_amd64.pyd and also _ufuncs_cxx.cp37-win_amd64.pyd

The error is generated specifically on the line "from scipy import special".

Also of note, though I guess it does not help much, is that I have followed a similar procedure for OSX and Linux platforms with no such issue, and no need for any manual hidden import specification...

Would appreciate any help that you can give to help figure out what is going wrong.

Eric Fahlgren

unread,
May 8, 2019, 3:06:25 AM5/8/19
to pyins...@googlegroups.com
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.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To post to this group, send email to pyins...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/01a518a3-e8b7-4dfc-be76-2d690e841daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages