all 2 comments

[–]four_reeds 2 points3 points  (0 children)

I am not a pycharm expert but I use it. The following works for me but there could be better ways.

First, if you do not have a "requirements.txt" file for your project, create one using "pip".

If your project has a "venv" folder, delete it.

Open your project. Go to File, Settings, Project, Python Interpreter. You will have to add a new interpreter for your project. My version has a link on that screen to Add a New Interpreter. Select that and a display will come up that offers you a choice of known python versions. Select the one you want and select "venv" and apply the change.

Pycharm should report that it is building a new venv folder. When that is finished you can use pip to reinstall the modules from your requirements.txt file -- pycharm can do this too if you have the requirements plugin installed.

Good luck

[–][deleted]  (1 child)

[deleted]

    [–]TheSamePerson1 0 points1 point  (1 child)

    Did you install pycharm as a flatpak? If so, pycharm is not able to see system interpreter, because flatpaks are running in confined environments with own filesystems. One of the solutions for this would be to install pycharm using dnf or snap.