question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upgrade jupyterlab-git prevents jupyter lab build

See original GitHub issue

Description

I am unable to run build command with installed jupyterlab-git:

  1. I want to add Jupytext Python package and the JupyterLab git extension to facilitate using Jupyter notebooks with Git & GitHub. I Install them via the following commands:
pip install --upgrade jupyterlab-git
conda install -y jupytext=1.*
jupyter lab build```

```$ jupyter lab build
[LabBuildApp] JupyterLab 2.2.5
[LabBuildApp] Building in C:\ProgramData\Miniconda3\share\jupyter\lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the `dev_build` and/or `minimize` options.

If you are building via the `jupyter lab build` command, you can disable
these options like so:

jupyter lab build --dev-build=False --minimize=False

You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named `jupyter_config.py`:

c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False

If you don't already have a `jupyter_config.py` file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:

jupyter --paths

Explanation:

- `dev-build`: This option controls whether a `dev` or a more streamlined
`production` build is used. This option will default to `False` (ie the
`production` build) for most users. However, if you have any labextensions
installed from local files, this option will instead default to `True`.
Explicitly setting `dev-build` to `False` will ensure that the `production`
build is used in all circumstances.

- `minimize`: This option controls whether your JS bundle is minified
during the Webpack build, which helps to improve JupyterLab's overall
performance. However, the minifier plugin used by Webpack is very memory
intensive, so turning it off may help the build finish successfully in
low-memory environments.

An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  C:\Users\egoro\AppData\Local\Temp\jupyterlab-debug-yy1cn6dp.log
  1. But I then do 'pip uninstall jupyterlab-git' and then run jupyter lab build` it works,
  2. After that, I do not have jupyter-lab git installed but I managed to run build command.

Context

  • Python package version: after my last step it is no longer installed
  • Extension version:
$ jupyter labextension list
   app dir: C:\ProgramData\Miniconda3\share\jupyter\lab
        jupyterlab-jupytext v1.2.1 enabled  ok
        nbdime-jupyterlab v2.0.0 enabled  ok
JupyterLab v2.2.5
  • Git version:
  • Operating System and its version: Windows 10
Command Line Output
$  jupyter lab --debag
[C 17:40:26.186 LabApp] Bad config encountered during initialization:
[C 17:40:26.186 LabApp] Unrecognized flag: '--debag'
JupyterLab - An extensible computational environment for Jupyter.

This launches a Tornado based HTML Server that serves up an HTML5/Javascript JupyterLab client.

JupyterLab has three different modes of running:

  • Core mode (--core-mode): in this mode JupyterLab will run using the JavaScript assets contained in the installed jupyterlab Python package. In core mode, no extensions are enabled. This is the default in a stable JupyterLab release if you have no extensions installed.
  • Dev mode (--dev-mode): uses the unpublished local JavaScript packages in the dev_mode folder. In this case JupyterLab will show a red stripe at the top of the page. It can only be used if JupyterLab is installed as pip install -e ..
  • App mode: JupyterLab allows multiple JupyterLab “applications” to be created by the user with different combinations of extensions. The --app-dir can be used to set a directory for different applications. The default application path can be found using jupyter lab path.

Subcommands

Subcommands are launched as jupyter-notebook cmd [args]. For information on using subcommand ‘cmd’, do: jupyter-notebook cmd -h.

build clean path paths workspace workspaces

Options

Arguments that take values are actually convenience aliases to full Configurables, whose aliases are listed on the help line. For more information on full configurables, see ‘–help-all’.

–debug set log level to logging.DEBUG (maximize logging output) –generate-config generate default config file -y Answer yes to any questions instead of prompting. –no-browser Don’t open the notebook in a browser after startup. –pylab DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib. –no-mathjax Disable MathJax

MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
very large, so you may want to disable it if you have a slow internet
connection, or for offline use of the notebook.

When disabled, equations etc. will appear as their untransformed TeX source.

–allow-root Allow the notebook to be run from root user. –autoreload Autoreload the webapp

Enable reloading of the tornado webapp and all imported Python packages
when any changes are made to any Python src files in Notebook or
extensions.

–script DEPRECATED, IGNORED –no-script DEPRECATED, IGNORED –core-mode Start the app in core mode. –dev-mode Start the app in dev mode for running from source. –watch Start the app in watch mode. –expose-app-in-browser Expose the global app instance to browser via window.jupyterlab –log-level=<Enum> (Application.log_level) Default: 30 Choices: (0, 10, 20, 30, 40, 50, ‘DEBUG’, ‘INFO’, ‘WARN’, ‘ERROR’, ‘CRITICAL’) Set the log level by value or name. –config=<Unicode> (JupyterApp.config_file) Default: ‘’ Full path of a config file. –ip=<Unicode> (NotebookApp.ip) Default: ‘localhost’ The IP address the notebook server will listen on. –port=<Int> (NotebookApp.port) Default: 8888 The port the notebook server will listen on (env: JUPYTER_PORT). –port-retries=<Int> (NotebookApp.port_retries) Default: 50 The number of additional ports to try if the specified port is not available (env: JUPYTER_PORT_RETRIES). –sock=<Unicode> (NotebookApp.sock) Default: ‘’ The UNIX socket the notebook server will listen on. –sock-mode=<Unicode> (NotebookApp.sock_mode) Default: ‘0600’ The permissions mode for UNIX socket creation (default: 0600). –transport=<CaselessStrEnum> (KernelManager.transport) Default: ‘tcp’ Choices: [‘tcp’, ‘ipc’] –keyfile=<Unicode> (NotebookApp.keyfile) Default: ‘’ The full path to a private key file for usage with SSL/TLS. –certfile=<Unicode> (NotebookApp.certfile) Default: ‘’ The full path to an SSL/TLS certificate file. –client-ca=<Unicode> (NotebookApp.client_ca) Default: ‘’ The full path to a certificate authority certificate for SSL/TLS client authentication. –notebook-dir=<Unicode> (NotebookApp.notebook_dir) Default: ‘’ The directory to use for notebooks and kernels. –browser=<Unicode> (NotebookApp.browser) Default: ‘’ Specify what command to use to invoke a web browser when opening the notebook. If not specified, the default browser will be determined by the webbrowser standard library module, which allows setting of the BROWSER environment variable to override it. –pylab=<Unicode> (NotebookApp.pylab) Default: ‘disabled’ DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib. –gateway-url=<Unicode> (GatewayClient.url) Default: None The url of the Kernel or Enterprise Gateway server where kernel specifications are defined and kernel management takes place. If defined, this Notebook server acts as a proxy for all kernel management and kernel specification retrieval. (JUPYTER_GATEWAY_URL env var) –app-dir=<Unicode> (LabApp.app_dir) Default: ‘C:\ProgramData\Miniconda3\share\jupyter\lab’ The app directory to launch JupyterLab from.

To see all available configurables, use --help-all

Examples

jupyter lab                       # start JupyterLab
jupyter lab --dev-mode            # start JupyterLab in development mode, with no extensions
jupyter lab --core-mode           # start JupyterLab in core mode, with no extensions
jupyter lab --app-dir=~/myjupyterlabapp # start JupyterLab with a particular set of extensions
jupyter lab --certfile=mycert.pem # use SSL/TLS certificate

(base)

Browser Output
Paste the output from your browser Javascript console here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
yuliaUUcommented, Aug 20, 2020

This worked!

jlpm cache clean # all claered
jupyter lab clean # Success
jupyter lab build 
1reaction
fcollonvalcommented, Aug 20, 2020

Could you try:

jlpm cache clean
jupyter lab clean
jupyter lab build

If it still does not work, could you try creating another conda environment to see if it works:

conda create -n test-git jupyterlab=2 jupyterlab-git=0.20
conda activate test-git
jupyter lab build
Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Lab extension @jupyterlab/git installation issue
Background. I want to install git extension for Jupyter Lab. As suggested here, I used the following commands: pip install --upgrade ...
Read more >
Setting up Git extension for JupyterLab - REDCAR - GitBook
Git for JupyterLab is an official Jupyter Lab extension. ... If this option is not available, you may need to upgrade your JupyterLab...
Read more >
JupyterLab with default Git integration (Watson Studio)
JupyterLab enables you to work with documents and activities such as ... Create a project that supports default Git if you haven't already...
Read more >
Jupyterlab-git in Jupyter Hub - JupyterHub
I installed JupyterHub following doc here. JupyterHub and lab are working fine. Now when I try to install jupyterlab_git it fails .
Read more >
JupyterLab Versioning - Amazon SageMaker
JupyterLab 3 · Restricting default JupyterLab version using an IAM policy condition key · Setting a default JupyterLab version · View and update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found