Error: OCI runtime create failed: container_linux.go:348

Answered

I have a Docker container setup to which I'm trying to connect PyCharm.  The following error is occurring:

Error:com.github.dockerjava.api.exception.BadRequestException: {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"/ssd/company-dev/venv/bin/python\\\": stat /ssd/company-dev/venv/bin/python: no such file or directory\": unknown"}

This is a valid path within the Docker container.  I know this because I jumped into the container via Terminal to examine the path.  It's also present for all of my colleagues and they're not getting this error.

The same error occurs when I click on "Install requirements" in the yellow tooltip that appears near the top of PyCharm.

So I have two related questions:

  1. What is causing this error?
  2. How do I resolve it?

Robert W.

14 comments

Same problem here. Could anyone help?

0

I tried to restart docker, pycharm, build again the images (any image, even that the image is working, is giving this error), restart the Mac... The problem still happens. 

0

I "fixed" it by deleting old Docker container and creating new one (based on Docker file), then assigned this new one as a remote Python interpreter to my project.

1

Thanks Mateusz. I tried to do it now, I even Reseted Docker to Factory Defaults. Now, before to give the error above, it shows also: "Getting Remote Interpreter Version". The image is working, but not as Interpreter in PyCharm.

0

Hi,

Thank you for contacting PyCharm support and sorry for a super-late reply.

Could you please make sure you are using the latest Docker version?

If problem remains, please do the following:

  1. Open Help | Debug Log Settings...
  2. Add the following line: #com.jetbrains.python.docker
  3. Click OK
  4. Reproduce the problem.
  5. Attach your idea.log (Help | Show Log in...).

Looking forward to your reply.

Kind regards,

Sergey

https://www.jetbrains.com

The Drive to Develop

0

Hello Sergey, thank you for the reply. Yeah, I'm using the last Docker Version: Version 18.06.1-ce-mac73 (26764).

2018-10-04 11:20:53,986 [13742240] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.jetbrains.python.docker
2018-10-04 11:21:05,114 [13753368] ERROR - minal.model.TerminalTextBuffer - Attempt to get line out of bounds: -32 < 0
2018-10-04 11:21:05,281 [13753535] INFO - packaging.PyPackageManagerImpl - Running packaging tool: /usr/local/bin/python3.7 /Users/williazi/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/182.4505.26/PyCharm.app/Contents/helpers/packaging_tool.py list
2018-10-04 11:21:16,436 [13764690] INFO - .CloudSilentLoggingHandlerImpl - Creating container...

0

Please upload logs folder zipped (Help | Show Log in...) to https://uploads.services.jetbrains.com/ and provide the name of the zip file.

Kind regards,

Sergey

https://www.jetbrains.com

The Drive to Develop

0

Uploaded: PyDockerPyCharm2018.2.zip

0

It is not there, unfortunately.

Please try again.

You should see

Upload complete!

when done.

Kind regards,

Sergey

https://www.jetbrains.com

The Drive to Develop

0

Done:

Upload complete!
Uploading...
File uploaded: PyDockerPyCharm2018.2.zip
Upload complete!
0

Thanks for the logs.

There is an exception "...caused \"exec: \\\"python\\\": executable file not found...". 

Please try with the full path to python executable when adding docker-based interpreter (Python interpreter path).

Kind regards,

Sergey

https://www.jetbrains.com

The Drive to Develop

2

Thanks Sergey. It works. As I'm using a Linux Image, Python version is the 3th. So, I just replaced:

python to python3


Thank you for the support. Best regards.

1

Thanks for your help. I a very similar issue. In order to solve it, I found my interpreter path on Docker using command :

sys.executable

Then I changed my Python interpreter path to :

 

0

Please sign in to leave a comment.