I want to avoid these kind of messages popping up, as I am not even using python 2.7. Note that the code runs fine.
I have tried the following things:
- Unchecking 'Code compatibility inspection'
- Checking 'Code compatibility inspection', but unchecking python 2.7
- Invalidate Caches/Restart
- Editing '.idea/misc.xml': component/version from 2 to 3
I am using a .sh wrapper around the python executable on the server as I want Pycharm to first source my ~/.bash_profile before using the interpreter (similar to this advice). I think that this might be the reason PyCharm doesn't recognize it as being python 3: if I point directly to the remote interpreter, the code compatibility issue dissappears.
Is there any way to keep the benefits of the wrapper and getting rid of these error messages?