Pycharm wont/unable connect to console

Answered

Hello! I'm fairly new to Pycharm and this is probably a very simple fix but its been driving me cray for days, I keep coming back to solve it an am getting nowhere. I can write scrips and run scripts fine, for example i just ran a program to print "hello" and its compiles fine and prints. But when i try to use the console it always says at the bottom 'connectiing to console...'. In the console window is printed

"/Users/Alex/PycharmProjects/FirstProject/venv/FirstProjectVen/bin/python /usr/bin/python3.4 "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevconsole.py" --mode=client --port=54050
/Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/bin/python3.4': [Errno 2] No such file or directory

Process finished with exit code 2"

I've look through tutorials, the Pycharm setting up instructions, and other forums but can find how to solve this issue. Ive tried updating Pycharm and have now even deleted it from my laptop and re downloaded it (so its definitely the latest version). Not really sure what I'm missing here. Any help would be greatly appreciated.  

12 comments
Comment actions Permalink

Hi!

Please share a screenshot of your console settings Preferences | Build, Execution, Deployment | Console | Python Console

0
Comment actions Permalink

Thanks for getting back to me!

0
Comment actions Permalink

Why do you have /usr/bin/python3.4 in Interpreter options field?
Removing it will solve the problem.

0
Comment actions Permalink

Thank you! I have removed it and now it's working, I knew it would be something simple like that! Thanks for your help!

0
Comment actions Permalink

Hey, i think i have the same problem but i don't have anything written in the interpreter options, 

I'm adding a screenshot:

0
Comment actions Permalink

Hi Noasapir97,

You are not actually running your file. If you want to run it as a script, right-click it and choose Run...

If you want to run it in Python Console, right-click it and choose Run File in Python Console

See https://www.jetbrains.com/help/pycharm/running-applications.html for more details.

0
Comment actions Permalink

Thanks,
I've done it and it still shows me the "process runing" on the left bottom of my screen.(You can see that on the first screenshot I've uploaded earlier)
I think something maybe went wrong with the way PyCharm react to the Python 3.7
I'll be more than happy if you'll help me:)

Thanks again!

0
Comment actions Permalink

What processes does it show when you click it?

Does Python Console open at all?

0
Comment actions Permalink

It shows “connecting to console”.
Im not sure I completely understood the meaning of opened console or how to check if it’s opened or not.

0
Comment actions Permalink

Try rebooting your computer. If that doesn't help, make sure nothing is blocking Python Console from connecting to the localhost. Quite often it can be caused by a firewall or antivirus.

0
Comment actions Permalink

Thanks,
before I try the rebooting solution,
I've seen something weird when I tried to run similar program in the Phthon console,
Im adding a screenshot:
and so on...

0

Please sign in to leave a comment.