Why is the Run option disabled on PyCharm?

86,935

Solution 1

You can't run without a configuration, however temporary configuration can be created automatically if you use Run context menu option in the script editor.

Solution 2

If you're creating a project from existing source: and If the existing source directory contains a lot of data/files:

  • the Run option (and others, assumably) are disabled until PyCharm is finished indexing the contents in the project. You'll see a progress bar in the lower-right-hand corner.

You can speed this up by right-clicking on folders and selecting "Mark directory as..." -> "Excluded" if they aren't to be indexed.

Solution 3

Right click inside your main file & then you get Run option!

Solution 4

I solved it just by right clicking on the .py file and clicking 'run'. After this the run button appeared enabled!

Solution 5

If the project folder contains a lot of files then the indexing process can take a long time. So you might need to wait before the Run button appears.

Share:
86,935
sorin
Author by

sorin

Another geek still trying to decipher the meaning of “42”. It seems that amount his main interest are: online communities of practice and the way they evolve in time product design, simplicity in design and accessibility productivity and the way the IT solutions are impacting it

Updated on July 08, 2021

Comments

  • sorin
    sorin almost 3 years

    I observed that on a new project the Run option is disabled and I expected to be able to run a script without having to manually add a configuration for it.