Alon
Alon

Reputation: 11945

How to add Python interpreter to InteliJ?

I went to File->Project Structure->SDKs, clicked the + button, chose use/bin/python3.7 and clicked OK, but it seems like the interpreter is still not configured (I still see red lines beneath all code lines and InteliJ keeps suggesting me to configure Python interpreter.

enter image description here

Upvotes: 3

Views: 3893

Answers (1)

Ortomala Lokni
Ortomala Lokni

Reputation: 62763

  1. Go to File -> Project Structure -> Modules

  2. Remove the module containing the Python files (it won't delete the files)

  3. Add a new Module, by setting Python as the Module SDK, and the content root to the already existing location.

I've tested this on IntelliJ IDEA 2020.1.1 (Ultimate Edition) and it works well.

Upvotes: 4

Related Questions