Skip to content

Commit 4bfdd2a

Browse files
committed
Make ldd usage simpler [ci skip]
Since static linking issue can occur in macOS, using `ldd $(which python) | grep libpython` could be confusing.
1 parent 9c2627b commit 4bfdd2a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,22 @@ If you are unsure if your `python` has this problem, you can quickly
175175
check it by:
176176

177177
```console
178-
$ ldd $(which python) | grep libpython
179-
libpython3.7m.so.1.0 => /usr/lib/libpython3.7m.so.1.0 (0x00007f17c12c4000)
178+
$ ldd /usr/bin/python
179+
linux-vdso.so.1 (0x00007ffd73f7c000)
180+
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f10ef84e000)
181+
libc.so.6 => /usr/lib/libc.so.6 (0x00007f10ef68a000)
182+
libpython3.7m.so.1.0 => /usr/lib/libpython3.7m.so.1.0 (0x00007f10ef116000)
183+
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f10efaa4000)
184+
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f10ef111000)
185+
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f10ef10c000)
186+
libm.so.6 => /usr/lib/libm.so.6 (0x00007f10eef87000)
180187
```
181188

182-
If it does not print the path to libpython like above, you need to use
183-
one of the workaround below.
189+
in Linux where `/usr/bin/python` should be replaced with the path to
190+
your `python` command (use `which python` to find it out). In macOS,
191+
use `otool -L` instead of `ldd`. If it does not print the path to
192+
libpython like `/usr/lib/libpython3.7m.so.1.0` in above, you need to
193+
use one of the workaround below.
184194

185195
The easiest workaround is to use the `python-jl` command bundled in
186196
PyJulia. This can be used instead of normal `python` command for

0 commit comments

Comments
 (0)