I am able to install ibm_db
package in order to access DB2 from Jupyter notebook:
!pip install ibm_db Requirement already satisfied: ibm_db in /anaconda2/lib/python2.7/site-packages (2.0.9)
but while trying to import
there’s an error:
import ibm_db --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-2-fe3bb08c8a05> in <module>() ----> 1 import ibm_db ModuleNotFoundError: No module named 'ibm_db'
Restarted the Kernel couple of times but it also had no impact. Anything that I am missing here?
Update:
Was able to resolve the issue by executing the below in Jupyter:
!pip uninstall ibm_db
and then
!conda install ibm_db -c anacharsis
Advertisement
Answer
Try installing it using conda instead of pip. You will probably have to first uninstall the version you added with pip:
pip uninstall ibm_db
Then install it with conda
conda install ibm_db -c anacharsis