Common errors
Fix PyCharm errors on Windows
No Python interpreter configured
Python not installed or not found by PyCharm
File > Settings > Python Interpreter > Add > select your Python installationCannot install packages — permission denied
Virtual environment not activated or system Python
Create a virtual environment: Settings > Python Interpreter > Add > VirtualenvPyCharm is very slow or freezes
Antivirus scanning PyCharm index files
Add PyCharm caches to Defender exclusions: %APPDATA%\JetBrainsImport errors — module not found
Package not installed in active interpreter
Open terminal (Alt+F12) and run: pip install package-namePyCharm shows red everywhere after opening project
Index corrupt or wrong interpreter
File > Invalidate Caches > Invalidate and RestartInvalidate caches
Invalidate caches and restart
This fixes most "red code" and indexing issues:
File → Invalidate Caches → check all options → Invalidate and Restart. PyCharm restarts and rebuilds its index. Takes 1–5 minutes.
FAQ
Troubleshooting questions
PyCharm not recognising installed packages
The package is installed in a different Python environment than the one PyCharm is using. Check: File → Settings → Python Interpreter — make sure the correct interpreter (the one where you installed the package) is selected. Also try File → Invalidate Caches → Invalidate and Restart.
PyCharm crashes on startup on Windows
Delete the PyCharm system directory to reset it: close PyCharm, delete %APPDATA%\JetBrains\PyCharm2026.1 (or your version), then restart. This resets all settings. Or start PyCharm with the --safe-mode flag to disable plugins.