Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. JupyterHub
  3. Installing External Libraries

Installing External Libraries

Scheduled Pinned Locked Moved Solved JupyterHub
7 Posts 3 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Is it possible to install external python libraries using pip via the terminal?

    robiR 1 Reply Last reply
    0
    • ? A Former User

      @robi I'm not able to install them because they still want to install it in the read-only directories for the base env. If I create an virtual environment using venv, I also won't be able to choose it as the kernel since there is no root system access.

      Not sure if I'm missing something.

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by girish
      #4

      @thpuffin You have to run inside the notebook and not in the Web Terminal of JupyterHub app.

      To understand why, please see https://docs.cloudron.io/apps/jupyterhub/#how-it-works . But at a high level, there is the "hub" which is essentially an authenticator/login service. The Web Terminal will give you access to this container. This container like other cloudron app containers is readonly.

      When a user logs in, a "notebook container" is created for each user. This way each user has a virtual environment of their own. This container is read/write and user can install anything. There is a "shell" from within jupyterlab itself and you have to run pip there. Also, see https://docs.cloudron.io/apps/jupyterhub/#notebook-persistence about persistence of any additional package you install.

      ? 1 Reply Last reply
      1
      • ? A Former User

        Is it possible to install external python libraries using pip via the terminal?

        robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #2

        @thpuffin only if they're in /app/data and not in /app/code

        Conscious tech

        ? 1 Reply Last reply
        0
        • robiR robi

          @thpuffin only if they're in /app/data and not in /app/code

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #3

          @robi I'm not able to install them because they still want to install it in the read-only directories for the base env. If I create an virtual environment using venv, I also won't be able to choose it as the kernel since there is no root system access.

          Not sure if I'm missing something.

          girishG 1 Reply Last reply
          0
          • ? A Former User

            @robi I'm not able to install them because they still want to install it in the read-only directories for the base env. If I create an virtual environment using venv, I also won't be able to choose it as the kernel since there is no root system access.

            Not sure if I'm missing something.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by girish
            #4

            @thpuffin You have to run inside the notebook and not in the Web Terminal of JupyterHub app.

            To understand why, please see https://docs.cloudron.io/apps/jupyterhub/#how-it-works . But at a high level, there is the "hub" which is essentially an authenticator/login service. The Web Terminal will give you access to this container. This container like other cloudron app containers is readonly.

            When a user logs in, a "notebook container" is created for each user. This way each user has a virtual environment of their own. This container is read/write and user can install anything. There is a "shell" from within jupyterlab itself and you have to run pip there. Also, see https://docs.cloudron.io/apps/jupyterhub/#notebook-persistence about persistence of any additional package you install.

            ? 1 Reply Last reply
            1
            • girishG girish

              @thpuffin You have to run inside the notebook and not in the Web Terminal of JupyterHub app.

              To understand why, please see https://docs.cloudron.io/apps/jupyterhub/#how-it-works . But at a high level, there is the "hub" which is essentially an authenticator/login service. The Web Terminal will give you access to this container. This container like other cloudron app containers is readonly.

              When a user logs in, a "notebook container" is created for each user. This way each user has a virtual environment of their own. This container is read/write and user can install anything. There is a "shell" from within jupyterlab itself and you have to run pip there. Also, see https://docs.cloudron.io/apps/jupyterhub/#notebook-persistence about persistence of any additional package you install.

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #5

              @girish I see.

              From what I understand, each user has a virtual environment of their own. Each user can install their own packages using the notebook itself, and not the terminal.

              That means that if a user were to have multiple virtual environments, then I would need to set it up using ipykernel via the notebook too?

              girishG 1 Reply Last reply
              0
              • ? A Former User

                @girish I see.

                From what I understand, each user has a virtual environment of their own. Each user can install their own packages using the notebook itself, and not the terminal.

                That means that if a user were to have multiple virtual environments, then I would need to set it up using ipykernel via the notebook too?

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @thpuffin Correct, each user can install their own packages. I am not 100% sure about the right terminology but.. there's only one environment per user. Inside each environment, a user can have many notebooks.

                Also, if you want to have a package pre-installed for all the users, you can just use a custom image - https://docs.cloudron.io/apps/jupyterhub/#selecting-a-notebook-image . You can use any of the notebook images from the upstream project - https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html

                ? 1 Reply Last reply
                0
                • girishG girish

                  @thpuffin Correct, each user can install their own packages. I am not 100% sure about the right terminology but.. there's only one environment per user. Inside each environment, a user can have many notebooks.

                  Also, if you want to have a package pre-installed for all the users, you can just use a custom image - https://docs.cloudron.io/apps/jupyterhub/#selecting-a-notebook-image . You can use any of the notebook images from the upstream project - https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html

                  ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #7

                  @girish Thanks for the answer. Having one and only one environment per user is quite the inconvenience 😞

                  1 Reply Last reply
                  0
                  • girishG girish marked this topic as a question on
                  • girishG girish has marked this topic as solved on
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search