diff --git a/README.md b/README.md index 5756d7fa..745a5f4e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ A desktop application for [JupyterLab](https://github.com/jupyterlab/jupyterlab) ## Download ![GitHub release (latest by date)](https://img.shields.io/github/v/release/jupyterlab/jupyterlab_app) +Before installing please read the [Python Environment Customization Guide](env-customization-guide.md) if you plan to customize the Python environment to add new packages. + - [Debian, Ubuntu Linux Installer](https://github.com/jupyterlab/jupyterlab_app/releases/latest/download/JupyterLab-Setup-Debian.deb) - [Red Hat, Fedora, SUSE Linux Installer](https://github.com/jupyterlab/jupyterlab_app/releases/latest/download/JupyterLab-Setup-Fedora.rpm) - [macOS Installer](https://github.com/jupyterlab/jupyterlab_app/releases/latest/download/JupyterLab-Setup-macOS.pkg) diff --git a/env-customization-guide.md b/env-customization-guide.md new file mode 100644 index 00000000..601f9a53 --- /dev/null +++ b/env-customization-guide.md @@ -0,0 +1,43 @@ +# Customizing the Bundled Python Environment + +JupyterLab App is a self-contained standalone desktop application which bundles a Python environment. The bundled Python environment comes with several popular Python libraries to make the App ready to use in scientific computing and data science workflows. These packages are `numpy`, `scipy`, `pandas`, `ipywidgets` and `matplotlib`. In order to install additional packages into JupyterLab App's Python environment, you need to follow certain steps during and after the installation as described below. + +## Linux Instructions + +On Linux, JupyterLab App is installed into `/opt/JupyterLab` and Python environment is created in `/opt/JupyterLab/resources/jlab_server` + +- Install the App by double clicking the installer file and wait for the installation to finish. +- Linux installs JupyterLab App as the root user. That's why it is necessary to change the ownership to the current user to be able to customize JupyterLab App's Python environment. +- Before launching JupyterLab App, open a Terminal and run the following command with your `username` to change App file system ownership. +```bash +sudo chown -R username:username /opt/JupyterLab +``` + +## macOS Instructions + +On macOS, JupyterLab App should be installed into `~/Applications/JupyterLab` for current user in order to allow environment customizations. Python environment is created in `~/Applications/JupyterLab.app/Contents/Resources/jlab_server`. + +- Make sure you install the App for current user in order to allow changes to App's Python environment. It is not the default location of the installer, you can set it by following these steps + +| Change Install Location | Install for me only | +| ------------- | ------------- | +| ![Choose Install Location](media/mac-install-location.png) | ![Choose Current User](media/mac-install-for-current-user.png) | + + +## Windows Instructions + +On Windows, JupyterLab App should be installed to default install location `C:\JupyterLab\`. There will be two installers running during setup. Keep the default paths for both installers. Python environment is created in `C:\JupyterLab\resources\jlab_server`. + +# Installing New Python Packages + +Make sure you installed JupyterLab App following the steps outlined above in order to have required permissions to install new Python packages. + +- Open a Notebook and run the command below in a cell for the package you want to install. You will see the log of the installation process as the cell output. + ```bash + !pip install + ``` + For example: to install scikit-learn + ```bash + !pip install scikit-learn + ``` +- In order to use the newly installed package you need to restart your active notebook's kernel or create a new notebook diff --git a/media/mac-install-for-current-user.png b/media/mac-install-for-current-user.png new file mode 100644 index 00000000..3caefcf0 Binary files /dev/null and b/media/mac-install-for-current-user.png differ diff --git a/media/mac-install-location.png b/media/mac-install-location.png new file mode 100644 index 00000000..e8253703 Binary files /dev/null and b/media/mac-install-location.png differ