python file show errors

Answered

intellij idea + python plugin, Macos

I have python script in my maven project, however intellij shows errors for python file as below screenshot. the python script runs ok in terminal. seems it can't detect the python sdk??  how do I solve this? thanks

 

0
7 comments

Hello,

Do you have "Python" facet added to your module with proper interpreter configured?

0

Hi Yaroslav, thanks for your response, would you please show me how to configure that? I'm very new to python.

0

You need to open "Project Structure | Modules", select needed module, click green plus and add "Python" framework. Then on the right side select interpreter (or create new one)

0

I added a module to point to python3 installed on my OSX, now the first two imports are fine, however the boto3 is still showing error. I guess it is related to python environment on my OSX?

I have python 2.6.9, 2.7.10 and 3.6.5, not sure how and why there are multiple versions got into my system.

I think boto3 is installed for python3 already, since I can execute the python script using below without issue.

python3 test.py 

how can I configure to let intellij recognizes boto3?

Thanks

0

Do you see "boto" in packages list for your interpreter ("Project Structure | SDKs | <Python_SDK> - Packages")?

Does IDE suggest to install this package if you put caret on "boto3" and press Alt+Enter?

0

I think my python installation somehow messed up, which I'm not sure why. See below available python environments. How can I uninstall them, and then reinstall correctly? I only need most recent version of python3 and python2. 

 

0

Please sign in to leave a comment.