I need to use Java and python in the same project, IntelliJ.
When I set up the JDK, the Java code was fine, but the import of the python package failed. On the contrary, python is normal and Java is problematic
IntelliJ is set as follows:
,,,
The python package import failed:
I see several methods on stack overflow:
I changed the SDK to python3.6 inProject Structure->Modules->Dependencies->Module SDK
and The Java JDK is still included in the Project Structure->Project->Project SDK
, but it is useless
I've set up the Python interpreter for the actual Facets and in Project Structure->Facets
and restart intellij, But it doesn't work
Can I set up python and Java SDK at the same time?
You need to "Add framework support" / Facets
As long as you already have python installed, just follow this.
Right-click the directory/module/project where you have your python scripts, right at the top you will see "Add framework Support..."
https://www.jetbrains.com/help/idea/adding-support-for-frameworks-and-technologies.html#disable-framework-auto-detection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With