Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm scratch files no interpreter set

Tags:

python

pycharm

I'm having a strange issue in pycharm that I can't find any information on.

If I try to run a scratch file nothing happens, with no error produced. They used to work fine in this version (2016.3.2) but now if I check the run config as shown below, it shows project default as none even though its set and working for project files.

No interpreter set

If I change that to something valid, the scratch will run but I have to do it for every file.

I'm thinking this issue has something to do with renaming the project folder. I'm thinking I could probably solve the issue by deleting the pycharm project files and re opening the project but maybe there's a better solution.

Update

I was only able to solve this issue by removing my .idea folder and reopening the project. Not sure what caused it and have never been able to reproduce it.

like image 212
bob Avatar asked Mar 02 '26 06:03

bob


1 Answers

I have had this same issue in the past as well, and I was also able to solve it by deleting the .idea folder and restarting PyCharm.

Also be careful about accidentally committing the .idea folder to your git repository (if you are using one), as this can lead to such problems when the same .idea folder gets used across different devices and software versions.

To avoid this, add the following entry to your .gitignore file:

# JetBrains IDEs
.idea
like image 99
Lars Frölich Avatar answered Mar 03 '26 20:03

Lars Frölich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!