Saba Kauser <skauserib...@gmail.com> added the comment:
I was able to determine the reason. When running through anaconda, the pip copies ibm_db.so to site-packages path. However, as logged in user, install_name_tool fails with permission denied error. BLR-D-MACOS03:site-packages skauser$ install_name_tool -change @loader_path/clidriver/lib/libdb2.dylib libdb2.dylib ibm_db.cpython-37m-darwin.so error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open input file: ibm_db.cpython-37m-darwin.so for writing (Permission denied) error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't lseek to offset: 0 in file: ibm_db.cpython-37m-darwin.so for writing (Bad file descriptor) error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't write new headers in file: ibm_db.cpython-37m-darwin.so (Bad file descriptor) error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't close written on input file: ibm_db.cpython-37m-darwin.so (Bad file descriptor) BLR-D-MACOS03:site-packages skauser$ sudo install_name_tool -change @loader_path/clidriver/lib/libdb2.dylib libdb2.dylib ibm_db.cpython-37m-darwin.so Even if i do "sudo pip install ibm_db", although the package is copied to site-packages, install_name_tool fails with error. However, if build the source via pip as : cd /Users/skauser/python-ibmdb/IBM_DB/ibm_db sudo pip install . install_name_tool is able to execute on ibm_db*.so. Do you have any idea why would the permission problem occur only if I do pip install from pypi and not from source? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36640> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com