Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyCharm support for DevContainers not working as expected #256

Open
undo76 opened this issue Nov 4, 2024 · 2 comments
Open

PyCharm support for DevContainers not working as expected #256

undo76 opened this issue Nov 4, 2024 · 2 comments

Comments

@undo76
Copy link

undo76 commented Nov 4, 2024

PyCharm has added support for devcontainers, but for some reason it is not working as expected. Some issues:

  • libraries are not recognised in the editor
  • There is "Connect" option to "devcontainer", but not "dev"

Maybe related to this? https://youtrack.jetbrains.com/issue/IJPL-65915/DevContainers.-workspaceFolder-variables-localWorkspaceFolder-localWorkspaceFolderBasename-dont-work-for-clone-sources

Update: replacing ${localWorkspaceFolderBasename} with raglite seems to do the trick.

@lsorber
Copy link
Member

lsorber commented Dec 20, 2024

I tested PyCharm's Dev Containers feature on the Conformal Tights repo, and it did work for me. You do need to be careful to:
1. select with Mount Sources, and
2. configure the Python interpreter to the virtual env created under /opt/my-project-env/bin/python.

I created #261 to explain exactly what you need to do to get it to work, and also improve the default experience a bit. Let me know what you think!

@lsorber
Copy link
Member

lsorber commented Dec 20, 2024

Unfortunately, it seems that PyCharm does not yet allow to configure the Python interpeter in devcontainers.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants