Dhanusha_Perera07
Dhanusha_Perera07

Reputation: 4584

How to enable python language support in InteliJ while using Docker

I want to use a Docker image and run my python project but when I develop the project I want to get suggestions and support from the IntelliJ IDEA IDE. Even though I could run the project successfully, I cannot get the support from the IDE.

Here I try to print a simple hello world! message.

Unresolved reference 'print'

Dockerfile

FROM mozilla/deepspeech-train
WORKDIR /speech-to-text-model
COPY ./src .
RUN python transcriber.py
  1. project structure > modules Setting up Python interpreter

  2. IDE does not recognize python statements.

  1. Run/Debug configuration window Run/Debug configuration

  2. Running the python project successfully. screenshot of the running project output

Upvotes: 0

Views: 146

Answers (1)

Andrey Resler
Andrey Resler

Reputation: 311

It appears to be a known issue - https://youtrack.jetbrains.com/issue/PY-44770

As mentioned in the ticket, the workaround is to move all python scripts to a separate module, instead of a facet.

Upvotes: 1

Related Questions