3
1

More than 3 years have passed since last update.

pip3でTypeエラーが出るようになった時の対処

Posted at

Mac にて pip3 のアップデートを行ったところ、以下のエラーが出るようになった。

Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/usr/bin/pip3", line 10, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable

直前に

xcode-select --install

は実施済だったため別の対処方法を探したところ、同様の事象で stack overflow に Problems using zsh with Catalina, Python/Python3, pip/pip3, PATH, zshrc, etc というのがあったので参考にし、以下の通りHomebrewでPython3の再インストールを実施しました。
 ※元々Python3をHomebrew経由でインストールしていたため

brew install python3

この後ターミナルを再起動し pip3 コマンドが正常に動くことを確認しました。
ターミナルを再起動せずに pip3 コマンドを実行してもエラーが出たままだったので、エラーが解消しない場合はご参考にしてください。

3
1
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
3
1