Error importing numpy pythonista
下記フォーラムに対応策が書かれています。
numpy
はPythonistaにプリンストールされている- ルートディレクトリの
site-packeges
にあるnumpy
は不要なので削除する - 解決
It seems that you have a copy of numpy
inside your site-packages
folder. Pythonista comes with numpy
preinstalled, so you should not install it manually into site-packages
. (In fact, you can't, because numpy
uses compiled code.) Try deleting the numpy
folder from your site-packages
, restart Pythonista, and see if you can import numpy
now.
Traceback (most recent call last): File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/pollen/pollen.py", line 3, in <module> import pandas as pd File "/private/var/mobile/Containers/Shared/AppGroup/04935D9E-D250-46E1-85A3-FF629AF9C8D3/Pythonista3/Documents/site-packages/pandas/__init__.py", line 19, in <module> raise ImportError( ImportError: Unable to import required dependencies: numpy: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.