Skip to content

max-line-length #6575

Answered by ccalvocm
LixiangHello asked this question in Q&A
Oct 14, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Greetings @LixiangHello

You can change the maximum line length for Jupyter Notebook by configuring the pep8 formatter. Here's how you can do it:

  1. Open your Jupyter Notebook configuration file. You can do this by running the following command in your terminal: jupyter notebook --generate-config.
  2. Find the line that starts with c.NotebookApp.nbserver_extensions. If this line is commented out (i.e., it starts with a #), remove the # to uncomment it.
  3. Add the following text to the end of the line: pep8_magic.
  4. Save and close the configuration file.
  5. Install the pep8_magic package by running the following command in your terminal: pip install pep8_magic.
  6. Restart your Jupyter Notebook server for th…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LixiangHello
Comment options

@ccalvocm
Comment options

Answer selected by LixiangHello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants