I create a Conda environment ( myenv ), and build a Python extension (using distutils
) in this env. My library uses some libraries which exist on both /usr/local/lib
and /home/user/miniconda3/envs/myenv/lib
.
In myenv , LD_LIBRARY_PATH
is empty, but ldd mylib.so
shows that my library links to libraries in /home/user/miniconda3/envs/myenv/lib
. This makes sense but I wonder why it doesn't link to libraries in /usr/local/lib
?
Most likely, you're using the compiler and related toolchain from your conda environment. This toolchain is set up to use the libraries from your conda environment automatically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.