I recently ported into the linux os , any time I try to create a new flask project or any other project it doesn’t install the package but it shows ‘failed to create interpreter’ .
Although I can manually set the interpreter up,but I would like a smoother workflow. My guess is that the problem should not be from pycharm but rather how ubuntu is configured.
The version of the pycharm pro is pycharm-2022.1.2
Python version is 3.10.2.
Ubuntu version is 22.04 LTS .
2
Answers
sudo apt install python3-distutils
fixed it.This problem can be caused by a bad installation of Pycharm or an absence of the Java package. If you are using the version of Pycharm provided on the JetBrains website, this behavior is normal and I advise you to install Pycharm via snap. To do so, execute the following command in your terminal:
If you have installed Pycharm this way, this error may come from your Java version. At this moment type this command in your terminal:
If none of this worked, uninstall Pycharm:
sudo snap remove pycharm-professional
. Then reinstall it.