Why can't I run a script in PyCharm, when I can debug it? I get CreateProcess error=123

I have a just reinstalled PyCharm but it is still causing me trouble: it will allow me to debug a python script, but it throws an error when I try to run it. The error when running is:

Error running test: Cannot run program "C:\Python27\python.exe" (in directory "C:\Users\Shellver\PycharmProjects\TestProject"): CreateProcess error=123, The filename, directory name, or volume label syntax is incorrect

I have tried creating new interpreters in other directories, I have turned off UAC, and have tried running PyCharm as administrator. Any other suggestions?

Thanks very much.


PyCharm 2.7.1.
Windows 7 64bit
Python 2.7

success when debugging.png

error when running.png

interpreter settings.png
Could you please attach a screenshot of your run configuration settings?
Please try going to Settings | Python Interpreters, deleting and recreating your Python interpreter. This should solve the problem.
Sorry Dmitry, I tried but it's exactly the same as it was :(

2013-03-13 22_26_45-Re_ Why can't I run a script in PyCharm, when I can debug it_ I get CreateProces.png

2013-03-13 22_28_59-Re_ Why can't I run a script in PyCharm, when I can debug it_ I get CreateProces.png
Here are my log files in case they help.
log.zip (27KB)
Hi Dmitry. Do you have any more suggestions please? I have tried multiple re-installs with no joy, and I'm out of ideas. Thanks!
Hello Dmitry - any response on this please? It's still a problem.
Hi Trevor! I see a lot of:
"Cannot run program "C:/Python27/python.exe" (in directory "C:\Python27"): CreateProcess error=2, The system cannot find the file specified "
in logs.

Definitely something wrong happened to your environment.

Can you manually launch python.exe?
Probably some environment variables are not set appropriately.
Please reinstall python on your machine.The directory with python installed and all its files should have appropriate rwx access mode for your user.

After that run PyCharm... go to  Settings | Project Interprreters | Python Interpreters.
Add your newly installed python interpreter, and set it as project interpreter in Settings | Project Interprreters

I hope it will work for you.
I'm sorry to say it's actually got worse: PyCharm won't even run now! It hangs during startup. The machine is generally ok: running ms office, visual studio, and allowing me to develop in python using notepad / idle etc.

Don't worry about it Dmitry. I'd say it's something to do with my setup rather than PyCharm itself. When I have time I'll have another go at it and try to get as close to a fresh install as possible. Thanks for you help anyway.

Please sign in to leave a comment.