How do I get IntelliJ to recognize common Python modules?

前端 未结 12 1320
甜味超标
甜味超标 2020-12-04 09:09

I\'m using IntelliJ 10 IDEA Ultimate Edition.

I\'ve created a new file Test.py, and IntelliJ has correctly switched to Python parsing mode. (I can confirm this by t

12条回答
  •  没有蜡笔的小新
    2020-12-04 09:52

    Another possible fix (solved my problem)

    You might have configured the environment properly but for some reason it broke along the way. In this case go to:

    file > project settings > modules
    

    Deploy the list of SDKs and look for a red line with [invalid] at the end. If you find one, you have to recreate a python sdk.

    It is likely that your previously working SDK is there too, but not red. Delete it.

    Now you can click on the new button and add your favorite python virtualenv. And it should work now.

提交回复
热议问题