Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
SciPy import error
-
I'm just trying to import scipy and I'm getting this error:
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/1701F3DE-82C4-468E-9C3E-657A36868569/Pythonista3/Documents/site-packages/scipy/init.py", line 97, in <module>
from scipy.config import show as show_config
ImportError: No module named 'scipy.config'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/1701F3DE-82C4-468E-9C3E-657A36868569/Pythonista3/Documents/sci.py", line 1, in <module>
import scipy
File "/private/var/mobile/Containers/Shared/AppGroup/1701F3DE-82C4-468E-9C3E-657A36868569/Pythonista3/Documents/site-packages/scipy/init.py", line 102, in <module>
raise ImportError(msg)
ImportError: Error importing scipy: you cannot import scipy while
being in scipy source directory; please exit the scipy source
tree first, and relaunch your python intepreter.What should i do?
-
This post is deleted! -
In short: SciPy is not included with Pythonista, and it is also not possible to install it yourself for technical reasons (e.g. the fact that you don't have a compiler on iOS, and cannot run unsigned code without jailbreak).
-
I am getting the same import error on import numpy and it IS part of pythonista. Is there an explanation for this?
-
@dwullery Can you copy and paste the full traceback for the error? It's impossible that it is exactly the same error, since the OP's error explicitly mentions scipy in the error message.
Also, you should try force-restarting Pythonista. (Double-click the home button, swipe Pythonista away to the top, then start Pythonista again from the home screen.) Sometimes when you stop a script while it is importing a module, it can get stuck in a half-imported state that causes lots of errors. The best way to fix that is to fully restart the app.
-
This post is deleted!