After days of looking for an answer on internet and, of course, in overflow I make this post. I hope someone could help me. I made a little program that fits some data that I got from chemistry experimentation with a math model using scipy.optimize. Then I got a plot of the points from the data and the fit. When I run it on the IDLE everything goes okay and when I run from windows command, too. The thing is that a want to make an .exe file so I could share my program with my university classmates. For this I used pyinstaller. When I run pyinstaller to make mi .exe file evertything is ok, but when I want to run it from windows command I get the next output:
Traceback (most recent call last):
File "solver_tp2fq_ver2.py", line 9, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "scipy\optimize\__init__.py", line 421, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "scipy\optimize\_shgo.py", line 9, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "scipy\spatial\__init__.py", line 107, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "scipy\spatial\transform\__init__.py", line 19, in <module>
File "rotation.pyx", line 5, in init scipy.spatial.transform.rotation
ModuleNotFoundError: No module named 'scipy.spatial.transform._rotation_groups'
[10152] Failed to execute script solver_tp2fq_ver2
As you can see I get the next error: ModuleNotFoundError: No module named 'scipy.spatial.transform._rotation_groups'
I don't understand why I get this error. I installed all the modules, checked that path is correct, upgraded the modules and also reinstalled python (Because this, actually I'm using python 3.9). I don't know what else I can do.
Well, I think it's all. I will be very thankfull if someone helps me.
scipy
developers by adding a pyinstaller hook, if I understand correctly: pyinstaller.readthedocs.io/en/stable/hooks.html – Cautionary