Python just hangs in IDE works elsewhere (beginner/installation)

So, I'm new to Python and to the kind of system admin stuff that I'm
having to do to get it work, so I may be making an obvious error.

I'm on MacOSX 10.8.something...

I used Macports to install python27, virtualenv, (I couldn't get virtualenvwrapper
to install for some reason, so I blew it off), pip.

I used the command line to set python, virtualenv and pip to the macports versions.

If I use the command line to execute a, it works fine.

I then installed Pycharm. No matter which python I set as the interpreter, I get the
same behavior... I hit run and the intepreter starts and just hangs there and does
nothing... eventually if I hit the stop button it will exit without error, code 0.

If instead of running I click on debug, I get this error:
/usr/local/bin/python /Applications/ –multiproc –client –port 49826 –file
Traceback (most recent call last):
  File "/Applications/", line 1402, in <module>
    setup = processCommandLine(sys.argv)
  File "/Applications/", line 1169, in processCommandLine
    setup['file'] = argv[i]
IndexError: list index out of range

Process finished with exit code 1

This happens no matter which python interpreter I use.

If I run the interactive console, it works fine, as expected.

Anyone have any idea what's going on?

(By I liteally mean one line, Print ("test"), and that's it.)
Comment actions Permalink
Looks like your run configuration is not set up correctly. Please make sure that the correct path to the script is specified in the "Script" field of the Run/Debug Configurations dialog.
Comment actions Permalink
Thank you! This was exactly the problem... totally obvious in retrospect but my head is still swimming trying to understand all the permutations of macport, pip, pythonXX and virtualenv... but in any event, thank you!
Comment actions Permalink

Thank you ~

Comment actions Permalink

it means you need to select your python script in the script configuration in the edit run configuration window


Please sign in to leave a comment.