I am facing an issue with Jupyter Notebook in the VS Code extension. Whenever I run a cell with a print() statement, the output panel shows only dashes (—) instead of the actual text output. However, when I copy the output from the notebook and paste it elsewhere (e.g., a text editor), the output appears correctly.
Screenshot
I expected the print() statements to display their output correctly in the Jupyter Notebook output panel in VS Code, such as:
x = 10
print(x)
print("Hello, world!")
Expected Output:
10
Hello, world!
What Happened Instead:
.
--
2
Answers
Try to use
display()
instead ofprint()
Set the font size:
settings.json: