Installing Libraries for all Users

Hi,

I have tljh installed on my local server and I am using my own Identity server for authentication. Everything works well but I am having issues installing libraries for my users. How can I install libraries for all users in tljh?

I have tried doing sudo apt-get install pandas and the installation is succusful but when I login in with a user and try
import pandas as pd

I get a module not found error.

TLJH uses a separate Python environment for users. Install conda, pip or apt packages — The Littlest JupyterHub v0.1 documentation has more information

Plus, according to here that wouldn’t even be the correct command for installing pandas currently via apt-get.
I’d stick to using conda or pip for installing pandas, numpy, and other things typical to the Python ecosystem. I’ve installed some complex modules using pip on TLJH following that documentation and had good luck.

1 Like

Hi, Sorry I posted the question in a hurry and wrote the wrong command, I am using pip to install packages but I am not using the terminal from Jupyter Notebook, I am using PUTTY to access the server where tljh is installed and using

sudo -E pip install numpy to install numpy but the module is not available for all users.

I have also tried to activate the environment using
source /opt/tljh/user/bin/activate

and then installed numpy using the above command but nothing seems to work.

image

Not following why you haven’t tried the recommended way to see if that fixes things?
I haven’t set a hub up and used it lately, and so I cannot confirm there aren’t issues; however, not following the documentation is not advised.