Jupyter unter Linux installieren¶
Auf Linux installieren nodejs und Jupyter:
sudo apt-get install nodejs
sudo apt-get install jupyterProbleme beim Start von Jupyter Lab¶
Aus einigen Gründen funktionieren die Befehle jupyter lab oder jupyter-lab nicht in einer anderen conda-Umgebung als base oder in Linux-Umgebungen. Öffnen Sie in diesen Fällen Anaconda Prompt (und aktivieren Sie die betreffende Umgebung) oder Linux Terminal und tippen Sie auf:
python -m pip install jupyter-labAlternativ funktioniert pip install jupyterlab (oder pip3 install jupyterlab) genauso gut.
Try to run jupyter lab or jupyterlab. If it still does not work, try (on Linux):
/usr/bin/env python /home/USER-NAME/.local/python3.X/site-packages/jupyterlabMake sure to replace USER-NAME with your local user name and python3.X with the installed version of Python (e.g., python3.7).
Jupyter erkennt installierte Pakete in Conda Env nicht¶
If you launch Jupyter from within a conda environment and the jupyter notebooks are not able to import the packages installed in the environment, you will need to install the ipykernel for the particular environment, too. For instance, this error applies when the import from osgeo import gdal in a jupyter notebook Python code cell started from the active flussenv environment results in an ImportError. To troubleshoot this error:
Shutdown Jupyter(Lab)
Stellen Sie in Anaconda prompt sicher, dass die Zielumgebung aktiviert ist (z.B.
conda activate flussenv)Überprüfen Sie, ob
ipykernelinstalliert ist, indem Sieconda listeingebenWenn
ipykernelnicht installiert ist, geben Sieconda install -c anaconda ipykernelein, um es zu installierenHinzufügen eines neuen Kernels mit:
ipython kernel install --user --name=KERNEL_NAMEErsetzen Sie
KERNEL_NAMEdurch den Namen, den Sie verwenden möchten (z. B.fluss_kernel)
Führen Sie
jupyter-laberneut aus, um den neuen Kernel aus dem oberen Menü auszuwählen (Kernel > Kernel ändern...)