[issue36640] python ibm_db setup.py post install script does not seem to work from Anaconda

Saba Kauser report at bugs.python.org
Thu Apr 18 05:43:48 EDT 2019


Saba Kauser <skauseribmdb at 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 <report at bugs.python.org>
<https://bugs.python.org/issue36640>
_______________________________________


More information about the Python-bugs-list mailing list