LoginSignup
0
0

More than 3 years have passed since last update.

pipでパッケージをインストールしたはずなのにModuleNotFoundErrorが発生する問題

Last updated at Posted at 2019-10-15

事象

pipで必要なパッケージを追加したのにプログラム実行時にModuleNotFoundErrorが発生してしまう.

原因

pipの向き先が誤っていた.
virtualenvで追加したpython3.7の実行環境にパッケージを追加したいのにpython3.6の実行環境に追加されていた.

解決方法

$(which python)で正しい向き先を指定する.

sudo $(which python) -m pip install mysqlclient
0
0
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
0
0