Closed tibuch closed 1 day ago
Hmm, i cannot seem to reproduce this example...
This shouldn't have anything to do with using pixi or conda. I think(?) how pycharm finds these things is by finding the correct python executable and then just scanning the site-packages directory of this environment (that's what's happening when you see Updating skeletons
).
Maybe pycharm just didn't refresh the skeletons yet?
This is how it looks for me right now:
And I only get these suggestions:
In the Interpreter Paths
dialog I can click the refresh button, which triggers Updating skeletons
. But in the end nothing changes.
Maybe I will try a fresh install of PyCharm next.
Hmm weird, that looks exactly like my setup... It might be that this is a general PyCharm on Linux issue. I only tested this on PyCharm for macOS since I expected that macOS and Linux behave sort-of similar...
Sounds like a reasonable assumption.
I have no idea where this is going wrong. Also resetted the caches of PyCharm, but so far nothing worked.
I noticed one difference. This is the External Libraries
directory if I load the env via pixi-pycharm:
This is how it looks like if I load an env with conda:
In the second (working) screenshot lib-dynload
, python3.11
, and site-packages
have a orange/yellow background.
Further I figured out that I can sym-link the pixi env into the envs
dir of conda and add it via conda. If I do that it works as it should.
Hi, found this while troubleshooting a different typing problem. Thanks for the screenshots of the External Libraries widget, it gave me an idea what the problem might be. That highlighting is for "non-project" files, so pycharm thinks that items found in the .pixi
folder are actually project files. My typing symptoms went away when I excluded the .pixi
folder (right click -> Mark Directory as -> Excluded).
It's not clear to me WHY the project vs non-project distinction confuses pycharm so much. However, I don't think there's anything for this project to fix, except maybe document the need to exclude the pixi folder from the project files if it is in the project folder.
Thanks, that sounds doable! @tibuch could you try if that fixed the issue?
Yes, this works! Thank you @richardsheridan!
But, I can't rename the environment and they are now all called default
. But I think this is another issue :slightly_smiling_face:
they are now all called default
xref #10
Hi,
I have this code snippet in PyCharm:
When I configure the interpreter via conda, PyCharm suggests the correct import (
from tifffile import imread
). Now I have configured the interpreter viapixi-pycharm
, but it will not suggest any imports.I can still write and execute the code, but I need to write the imports myself. So this is more a quality of life feature :slightly_smiling_face:
If I add the import myself, I can run the code via the configured
pixi-pycharm
interpreter :+1: