pycharm error whith running code Abdalrahmandaboor Created September 09, 2025 11:46 Hi, when I run a Python code using PyCharm, the output is always "No pyvenv.cfg file." How can I fix the error and run any code using PyCharm
Hi Abdalrahmandaboor
The issue is likely related to a broken/corrupt interpreter.
You can verify this by running your python script also from a terminal (using same virtual environment) and not from Pycharm.
Can you delete the current interpreter and create it from scratch as described here https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html
Please let me know if this fixes your issue.
Kind regards,