LoginSignup
0
0

AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? の解決

Posted at

遭遇環境

OS: Windows 10
version: Python 3.12
IDE: PyCharm2022
開発環境: PycharmでのNewProjectによる仮想環境

状況

Python3.12で開発を行おうとしたところ、pipコマンドでエラー発生

結論

PyCharm2023でNewProjectを作成

考察

これまでのPyCharm2022とPyCharm2023では仮想環境を作成するプロセスが違うのだと思います。

参考記事
Python3.12のpipがバグってる件&とりあえずの修正方法

こちらの方が示してくれている通り、
python3.12/site-packages/pip
の中のコードが違っています。

PyCharm2022でNewProjectを行う際にインタプリタを3.12に指定してもなぜかインタプリタ名が3.10になっていたので、試しに3.12のPython.exeを直接指定したところ、仮想環境の構築に失敗しました...
(´・ω・`)

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