Cannot run jupyter notebooks, installed modules are not found

The attached screenshot illustrates my problem, which is that I cannot run most of my jupyter notebooks that were working just a few days ago. Apparently, the directory where the modules are installed is no more in the search path.

For now, my fix is to add the missing path manually:

import sys
sys.path.append('/home/ubuntu/.lambda/lib/python3.10/site-packages')

But I would like to find a better solution, which does not require modifying every notebook file I use.

Hi,

Lambda’s engineers are working on a permanent fix.

For a temporary workaround, please run the following command:

echo "c.InteractiveShellApp.exec_lines = ['import sys; sys.path.append(\"/home/ubuntu/.lambda/lib/python3.10/site-packages\")']" \
>> ~/.ipython/profile_default/ipython_config.py

That should work around the issue until a fix is released.

Edit: The above command is just a workaround.

1 Like

Hi,

Thanks a lot, it does fix the issue.

1 Like

Hi,

As the person at lambda who should have tested this better, I’d like to apologize.

The goal was to have Jupyter installed inside a virtual environment, while still having notebooks and interactive terminals started through Jupyter using the default namespace. On the first attempt, we fell short on that second part.

If you launch an instance now, you should find that !pip install in notebooks works again, and that running “pip list -v | grep home” on a fresh instance returns no results, meaning that the Jupyter install should not conflict with any of the dependencies of your machine learning projects. Also, no amount of "pip install"s in the base environment should prevent the Jupyter service from running as expected.

Sorry again, and @underactuated , if you would like to test this new configuration and our new ARM64 GH200 instances, I’m happy to provide you with 1 hour’s worth of cloud credits to use on GH200 instances.

Just reply with the email address associated with your lambda cloud account, or file a support ticket and mention “I’m @underactuated on the deeptak forums and Jordan said he would add an hour’s worth of GH200 credits to my account” . (so that you’re not publicly posting your email address here)

Hi,

No problem. But it seems there is another issue with Jupyter now, as mentioned in this post Jupyter not displaying

I have the same problem, I cannot see my scripts. Could you help with it?
Thank you.