skip to Main Content

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


  1. Try to use display() instead of print()

    Login or Signup to reply.
  2. Set the font size:

    settings.json:

    "notebook.output.fontSize": 0
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search