Python project Interpreter: docker-compose CreateProcess error=193

I get this error when trying to add a new interpreter with docker-compose, it is working on a Mac computer, but can't make it work on Windows 10 Pro

Any Idea why this is happening?

PyCharm 2020.1.1 (Professional Edition)
Build #PY-201.7223.92, built on April 30, 2020

Runtime version: 11.0.6+8-b765.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Non-Bundled Plugins: com.daylerees.rainglow, com.pablogsal.black, net.seesharpsoft.intellij.plugins.csv, BashSupport, Show As ..., org.toml.lang

 

 

2
9 comments

Could you check your idea.log from Help | Show Log in... for relevant errors/exceptions?

Also, share a screenshot of your Docker settings File | Settings | Build, Execution, Deployment | Docker

0

I have the same error in RubyMine 2019.3.3 , any updates on this issue?

0

that's the log

 

2020-05-24 12:25:56,508 [ 70183] INFO - DockerComposeCredentialsEditor - Error while parsing "C:\tmp\agama\tq_docker\docker-compose.yml": Cannot run program "C:\Program Files\Docker\Docker\resources\bin\docker-compose" (in directory "C:\tmp\agama\tq_docker"): CreateProcess error=193, %1 is not a valid Win32 application
java.io.IOException: Error while parsing "C:\tmp\agama\tq_docker\docker-compose.yml": Cannot run program "C:\Program Files\Docker\Docker\resources\bin\docker-compose" (in directory "C:\tmp\agama\tq_docker"): CreateProcess error=193, %1 is not a valid Win32 application
at com.intellij.docker.remote.DockerComposeCredentialsEditorLanguageContribution.getDockerComposeConfigurationInfo(DockerComposeCredentialsEditorLanguageContribution.java:67)
at com.intellij.docker.remote.DockerComposeCredentialsEditor.lambda$updateServiceNameComboBox$2(DockerComposeCredentialsEditor.java:124)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

 

PyCharm 2020.1.1

docker desktop 2.3.0.2

0

Recently, I ran into exactly the same problem.

I just added the file extension (.exe) in the Docker settings and it worked for me (Windows 10, PyCharm 2019.2.3, Docker Desktop 2.3.0.2)

I hope this helps you too.

11

That was the point. Works for me. Thank you so much!

1

The solution above worked. It should have a ".exe" extension.

1

Hi,

I have the same error. 
Seem I should put ".exe" extension to path. But in my case, I don't have Docker Desktop. I'm using docker and docker-compose inside WSL (Linux version of docker-compose). 

Can you tell me how to make it works with docker-compose on Linux? Or is it impossible?  

 

0

@Hohoangtung12a3

I highly doubt this scenario is supported. Why not use Docker Desktop for Windows? It has a WSL backend for the containers.

0

Andrey Resler
Thank for your answer.
I have the same opinion, maybe Pycharm Windows can not execute Docker in Linux.  

My team want to move everything to Linux environment, so we want to use Docker Linux. 

Then now we have to use Pycharm for Linux too. This will solve problem. 

0

Please sign in to leave a comment.