Pycharm not resolving packages in remote docker interpreter

Am baffed!

See the image below.  PyCharm warns that Egnyte is not installed, yet when I go into the interpreter settings I can see the package list.  To confuse things even more, if I debug the app it works just fine i.e. the packages are in fact installed and are being picked up.

7
10 comments

This is most likely a Docker issue. Please try:

1. File > Invalidate caches / restart

2. Reload interpreter paths:

2

Hi

Invalidate caches doesn't solve the problem.

However, reload paths is not picking up any paths.  Do you know what I should be seeing?

Thanks

Darren

1

Figured it out.  For some reason a path ending in a colon was the problem.  Once the trailing colon from the path was removed everything started behaving normally.

0

Hi Darren, 

I have the same issue. Can you elaborate on how you fixed the issue and where did you change the path?

Thanks,

Umamahesh

0

Hi Darren Thorpe,

I got the same issue as you -- the paths are not picked up even after invalidating the caches. What path did you end up changing? Did you have to map the paths manually?

Thanks!

0

For me,

  • File > Invalidate caches... > clear file system, clear downloaded shared indices, Invalidate and restart

was somehow deleting and rebuilding the cache folders with the same wrong/old state.

I went and deleted all cache folders (there were multiple) and then "Invalidate and restart" again, and it fixed it. (in /Users/dariofigueira/Library/Caches/JetBrains/PyCharm2021.1/remote_sources)

0

Hello, I still have the same issue with Pycharm Professional version 2022.3.2

All my packages are well installed in the interpreter I can run script but I have ```Unresolved reference```

I have nothing inside the "Interpreter Paths"

I use Docker container with python 3.8

poetry config virtualenvs.create false && poetry install


I already test invalided cache and restart and also remove the /remote_sources cache directory. 

Do you have any advice ?


thank you 

 

0
Hello Guillaume,

Please try re-creating environment.

If this didn't help, please create a separate support request via Help | Contact Support...
0

Hello everyone,

I recently encountered the same issue described here, where packages in the Docker Compose remote interpreter were installed and functional, but PyCharm wasn't recognizing them, causing "Unresolved reference" warnings.

After diving deep into the PyCharm logs, I found an error related to a path that wasn't shared with Docker. The specific error was:

vbnet
Error response from daemon: Mounts denied: The path /tmp/remote_sync... is not shared from the host and is not known to Docker.

This led me to investigate Docker's file sharing settings. Here's the solution that worked for me:

Solution:

  1. Open the Docker Desktop application.
  2. Navigate to Preferences or Settings.
  3. Go to the Resources tab.
  4. Click on File Sharing or a similar menu.
  5. Add the /tmp directory to the list of shared directories.
  6. Click 'Apply' and restart Docker.

After adjusting these settings, PyCharm correctly recognized all the packages installed in the Docker remote interpreter.

I recommend checking PyCharm's logs if you encounter similar issues, as they can provide valuable insights.

Hope this helps someone!

2

Please sign in to leave a comment.