Saba Kauser <[email protected]> added the comment:
Thanks Karthikeyan.
The behavior is specific to anaconda when I use the python/pip that comes with
it. When I use the pip from anaconda,
e.g:/Users/skauser/anaconda3/bin/pip
pip install ibm_db
Installation is success,but when I import ibm_db, I get this error
import ibm_db
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError:
dlopen(/Users/skauser/anaconda3/lib/python3.7/site-packages/ibm_db.cpython-37m-darwin.so,
2): Library not loaded: libdb2.dylib
Referenced from:
/Users/skauser/anaconda3/lib/python3.7/site-packages/ibm_db.cpython-37m-darwin.so
Reason: image not found
Reason being, the post install script of my setup.py is not executed and hence
following command did not run post install .
for so in glob.glob(get_python_lib()+r'/ibm_db*.so'):
os.system("install_name_tool -change libdb2.dylib {}/lib/libdb2.dylib
{}".format(clipath, so))
Can be seen at
https://github.com/ibmdb/python-ibmdb/blob/master/IBM_DB/ibm_db/setup.py#L58
However, when I use the standalone python installation that is outside of
anaconda distribution, pip install correctly runs the post install script
ibm_db's setup.py.
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ibm_db
>>
The error Reason: image not found is specific to MAC due to its security
setting and I have added a workaround that is expected to work with pip
install. However, it does not seem to work.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com