How do I get IntelliJ to recognize common Python modules?

前端 未结 12 1313
甜味超标
甜味超标 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:53

    Here's what I had to do. (And I probably forgot an important aspect of my problem, which is that this wasn't set up as a Python project originally, but a Java project, with some python files in them.)

    Project Settings -> Modules -> Plus button (add a module) -> Python

    Then, click the "..." button next to Python Interpreter.

    In the "Configure SDK" dialog that pops up, click the "+" button. Select "Python SDK", then select the default "Python" shortcut that appears in my finder dialog

    Wait about 5 minutes. Read some productivity tips. :)

    Click Ok

    Wait for the system to rebuild some indexes.

    Hooray! Code hinting is back for my modules!

提交回复
热议问题