Today I tried to pack my simple python script with pyinstaller
in Windows, and I found this error
ModuleNotFoundError: No module named ‘scipy.spatial.transform._rotation_groups’
The reason for this error is explained here
https://github.com/pyinstaller/pyinstaller/issues/5440#issuecomment-753600979
The problem is that
scipy.spatial.transform.rotation
is a compiled module, so its dependencies (in this casescipy.spatial.transform._rotation_groups
) are not automatically picked up by dependency analysis.Adding
scipy.spatial.transform._rotation_groups
tohiddenimports
, either in your.spec
file or via--hiddenimport
command-line switch should fix the problem.
Here is a solution
https://github.com/pyinstaller/pyinstaller/issues/5454
I realized that these two issues were closed. The simplest way to solve this problem is upgrading my pyinstaller
to its latest version (now is 5.0.1
).
Problem solved.