3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【PyCharm】Python 3系を使っているのにPython version 2.7 doesn't have module pathlibと怒られる

Posted at

原因

インスペクションのコード互換性の指定にPython2.7を指定しているため。

解決方法

環境設定>エディター>インスペクション>コード互換性インスペクション(英語版の場合はPreference>Editor>Inspections>Python>Code Compatibility inspection)のオプションにあるバージョン指定から2.7のチェックを外す。あるいはコード互換性インスペクション自体のチェックを外す。
3.7系のコード互換性チェックを残したいなら前者。そもそもコード互換性チェックは不要であれば後者。

Pycharm コード互換性.png

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?