8

when I run my python file it's nothing except express "connecting to console" like this

enter image description here

what's wrong?

Nipun Sampath
  • 3,121
  • 1
  • 14
  • 22
bgx
  • 101
  • 1
  • 3
  • Did you set up a Python interpreter for the console in `File > Settings > Build, Execution, Deployment > Console > Python Console`? If yes, we will need more info about what do you mean by "run my python file" and how you are trying to run it in order to be able to help you. – Eskapp Dec 28 '18 at 15:26
  • firstly,thank you for your answer,I use the newest pycharm and anaconda , and when I run my python file(run the python code) ,there is no answer,just show connecting to console,and I want know if the version problems? – bgx Dec 29 '18 at 05:30
  • The version is not the problem, I use the exact same. It looks like a configuration issue. – Eskapp Dec 29 '18 at 14:29
  • Thanks your ,I have already solved my problems, as what you say , it exactly is the configuration issue – bgx Dec 30 '18 at 11:41
  • Could you write an answer to your own question explaining how you solved the issue for any future reader that runs into the same problem? – Eskapp Jan 02 '19 at 18:27
  • Fine , I have put it on – bgx Jan 03 '19 at 12:10
  • A similar issue was fixed with PyCharm 2019.3 and Python 3.8, see https://stackoverflow.com/questions/59371627/pycharm-does-not-connect-to-console-with-python3-8?rq=1 – questionto42 Jun 28 '20 at 11:58

2 Answers2

2

I solved my issue and here is how I did it . I create an new environment in anaconda with python 3.6 and then use pip to install the package I want, meanwhile when we import our new environment, we should check inherit global site-packages.Then we can use Pycharm as we want.

bgx
  • 101
  • 1
  • 3
1
  1. Press CTRL + ALT + S to open your setting.
  2. Go to your Project: -> Project Interpreter -> The Gear on top right
  3. Choose the Conda Environment
  4. Follow this link: https://docs.anaconda.com/anaconda/user-guide/tasks/pycharm/
Azriel Tan
  • 51
  • 4