admin管理员组

文章数量:1332865

pycharm version

PyCharm 2024.2.4 (Professional Edition)
Build #PY-242.23726.102, built on October 22, 2024
Runtime version: 21.0.4+13-b509.26 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 5.15.0-126-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  zielu.gittoolbox (600.0.7+242)
Current Desktop: ubuntu:GNOME

Running on Ubuntu 20.04 LTS

Docker version 4.35.1 (173168) in desktop-linux context with docker user group (I do not need to run sudo to use docker commands).

Using docker file to build www image based on python 3.12.7 and docker compose to bridge the stack. pycharm is configured to use the docker compose file for interpreter settings.

I have tried the following troubleshooting:

  1. invalidate cache and restart
  2. delete all images/containers/cache in docker
  3. deleting the interpreter settings and making them fresh
  4. adding paths to the package locations within the container to pycharm
  5. stop and start docker daemon
  6. fully reinstall pycharm and docker after completely deleting them (full purge, config and all).

Nothing seems to work. Pycharm keeps marking my packages as unresolved even though it sees them in docker container, picture attached.

What is weird is this worked fine until I deleted the a image and rebuilt it then this issue started appearing. The containers run fine via docker CLI, pycharm just keeps marking the packages as unresolved.

I am at a loss of what to do next, any advice? Thanks.

本文标签: pythonPycharm sees packages in docker interpreter but still marks them as unresolvedStack Overflow