print() doesn't work on python console with sklearn import (pycharm 2018.1, windows10)

已回答

Using a file with just these 2 lines:

   from sklearn.cluster import KMeans

   print('done')

'done' is printed correctly both in the python command-line and when run with the 'Run with Python Console' left unchecked in the run configuration.  However when I check the 'Run with Python Console' option, done is not printed.  print() does work when typed into the resulting console.

Commenting out the import also causes 'done' to be printed on the console.

I've tried restarting pycharm, no effect.

0

FYI It also works ok if I step through with the debugger, even the the console option checked.  Maybe some kind of race condition?

0

请先登录再写评论。