question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LD_LIBRARY_PATH is not respected

See original GitHub issue

Environment data

  • VS Code version: 1.51.1

  • Jupyter Extension version (available under the Extensions sidebar): !ldd /ccs/home/hzfmer/file_back/programs/andes/anaconda3/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-x86_64-linux-gnu.so | grep libnsl

  • Python Extension version (available under the Extensions sidebar): !ldd /ccs/home/hzfmer/file_back/programs/andes/anaconda3/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-x86_64-linux-gnu.so | grep libnsl

  • OS (Windows | Mac | Linux distro) and version: Linux-Red Hat 7.6

  • Python and/or Anaconda version: 3.8.3-Anaconda

  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda

  • Jupyter server running: Remote

Expected behaviour

I was trying to import a package “gdal” from “osgeo”, which is successful if I ran it in the system or VSCode terminal, while in vscode-jupyter it was unable to find the dynamic library “libnsl.so.1”. It’s strange that ldd in the terminal finds it, but Jupyter doesn’t.

I have added the location of this library to LD_LIBRARY_PATH, and Jupyter seems to read the variable, but somehow doesn’t respect it.

Actual behaviour

image

Steps to reproduce:

This might be not very likely to reproduce, since I am working on an HPC cluster. I would expect some setting/configuration as a workaround.

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. XXX

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hzfmercommented, Dec 11, 2020

For any one reads this in similar situation, Jupyter via Remote-SSH uses the default SHELL, and even if you specify a different SHELL through RemoteCommand in ssh config, it’s not respected. Please read the comment above to change your environment variable is needed, or change the default shell instead.

0reactions
IanMatthewHuffcommented, Dec 11, 2020

Thanks for looping back with the solution in case any one else hits this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

apache doesn't respect LD_LIBRARY_PATH? - Stack Overflow
The LD_LIBRARY_PATH must be set in the environment outside of the Apache process when Apache is started. It cant be set inside of...
Read more >
Setting LD_LIBRARY_PATH not enough? - linux - Server Fault
I've edited my /etc/bashrc to set LD_LIBRARY_PATH like in my previous question that I asked. However it does not seem to be taking...
Read more >
ubuntu - The LD_LIBRARY_PATH environment variable is not ...
The way I can tell that the LD_LIBRARY_PATH environment variable is not recognized by the target executable's runtime environment, is that the ...
Read more >
Why LD_LIBRARY_PATH is bad - Xah Lee
LD_LIBRARY_PATH is an environment variable you set to give the run-time shared library loader (ld.so) an extra set of directories to look for...
Read more >
LD_LIBRARY_PATH not loading from .profile nor /etc ...
However it seems that while Ubuntu does respect LD_LIBRARY_PATH, it has another mechanism for locating dynamic libraries. If you run sudo ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found