LoginSignup
20
34

More than 5 years have passed since last update.

【Python】インストールしたはずのMuduleが「No module named '***'」になったときの解決策

Posted at

環境:OSX sierra 10.12.4
Python 3.6

pip install "module名"

でインストールしたはずのmoduleをインポートしようとしたところ、

import "module名"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'module名'

こうなりました。

調べてみた結果、インストールされた場所とPythonが見にいっている場所(?)が違う模様。

インストールされた場所
/usr/local/lib/python3.6/site-packages/

見にいっている場所
/Users/名前/anaconda/lib/python3.6/site-packages

インストールしたmoduleを丸ごとよっこらせと移動することで無事読み込めるようになりました。

20
34
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
34