pythonpycharmpython-venv

Weirdest behaviour (pycharm, python, virtual environment, loading error)


Long story short: python "sees" some files but not others. the console inside pycharm

the files are there

And this is what I'm trying to do:

I want to use "enchant" spellchecking lib in python. I've written some code that works perfectly in external terminal (= linux terminal = system shell), but fails when I run under pycharm. The error message is "ImportError: The 'enchant' C library was not found and maybe needs to be installed." These are other infos somehow related to the problem:

In short, I don't think it's a problem specific from the pyenchant library. I just find VERY weird that the simplest os.path.exists fails to detect the presence of some files, but detects others. They all are in the same folder and have similar attributes (readable permissions). I can't understand what is happening.


Solution

  • Thanks to @metatoaster for suggesting the right answer!! Apparently the issue is related to flatpak.

    I solved the issue by uninstalling Pycharm from flatpak, then downloading the .tar.gz from Jetbrains website and "installing" that one (actually just unpacking).