PEP8 inspection in PyCharm not working with Docker remote python interpreter

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

2 comments

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.

0

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

Please sign in to leave a comment.