PEP8 inspection in PyCharm not working with Docker remote python interpreter

Answered

I use local python interpreter, pep8 work well and I see all warnings in my files. Then I switch to remote python interpreter from Docker, all warnings disappeared.

Python on local and Docker: 2.7.12
Pycharm: PyCharm 2017.3.3 (Professional Edition) Build #PY-173.4301.16, built on January 11, 2018

4
7 comments
Avatar
Permanently deleted user

I have the same problem. Any fix?

PyCharm 2018.2 (Professional Edition)
Build #PY-182.3684.100, built on July 24, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Edit: Adding a non remote python interpreter to the project fixed the problem, even after switching back to the remote interpreter.

-1
Avatar
Permanently deleted user

My problem is PyCharm doesn't index installed python package of docker container if it doesn't run with PYTHONPATH environment variable. So that, PyCharm can't run pep8 inspection in docker container.

My solution is set PYTHONPATH environment for web container.

environment:
      - PYTHONPATH=/opt/project

 

0
Avatar
Permanently deleted user

This happens when I use a Vagrant interpreter as well. Same problem, PEP8 inspections work fine when pointed to my local env but don't work at all when pointed at remote.

0

Hi Danthony,

Please report the issue to https://youtrack.jetbrains.com/issues/PY and attach the screenshot showing the problem as well as idea.log (Help | Show Log in...) after reproducing the problem.

1
Avatar
Permanently deleted user

Still seems to be an issue when working with a remote python interpreter in a docker container. I was able to resolve the issue following the advice from Christoph-benjamin Blessing comment.

-1

Do you have an idea to solve this issue ? 

Thanks

0

Hello,

Currently, PEP8 inspections work with local Docker interpreters.

0

Please sign in to leave a comment.