print() doesn't work on python console with sklearn import (pycharm 2018.1, windows10)
Answered
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.
Please sign in to leave a comment.
FYI It also works ok if I step through with the debugger, even the the console option checked. Maybe some kind of race condition?
Please check https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000179970/comments/360000152484. Does it help?