Python Forum
ibm_db error even though package is installed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ibm_db error even though package is installed
#1
Hi,

I've installed ibm_db to project interpreter but when I run my script I get the following error:

Error:
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/paulcarron/Downloads/Python/billing_extraction/Main.py 2010-01-01 2020-01-01 Carron Traceback (most recent call last):   File "/Users/paulcarron/Downloads/Python/billing_extraction/Main.py", line 5, in <module>     import ibm_db ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ibm_db.so, 2): Library not loaded: libdb2.dylib   Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ibm_db.so   Reason: image not found Process finished with exit code 1
Can anybody advise on the issue and ho to resolve it?
Reply
#2
image not found ...
is that library supposed to contain, (or dependent on image(s))?
Reply
#3
Sorry, I'm not sure. Python is new to me.
Reply
#4
See this or this or this. I hope you find a solution there.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#5
Thanks but I've already seen them.

I tried running it through Terminal and got the following:

Error:
Thanks but I've already seen them. I tried running it through Terminal and got the following: Python Main.py Traceback (most recent call last):   File "Main.py", line 5, in <module>     import ibm_db ImportError: dlopen(/Library/Python/2.7/site-packages/ibm_db-2.0.7-py2.7-macosx-10.12-intel.egg/ibm_db.so, 2): Library not loaded: libdb2.dylib   Referenced from: /Library/Python/2.7/site-packages/ibm_db-2.0.7-py2.7-macosx-10.12-intel.egg/ibm_db.so   Reason: unsafe use of relative rpath libdb2.dylib in /Library/Python/2.7/site-packages/ibm_db-2.0.7-py2.7-macosx-10.12-intel.egg/ibm_db.so with restricted binary
Does that shed any light on the reason?

Sorry, ignore that last post. I was executing with the wrong version of Python. I get the same error in terminal as when I execute the script in PyCharm:

Error:
Traceback (most recent call last):   File "Main.py", line 5, in <module>     import ibm_db ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ibm_db.so, 2): Library not loaded: libdb2.dylib   Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ibm_db.so   Reason: image not found
Reply
#6
Do you have a reason for using ibm_db?
I think if you don't already have code that uses DB2 or Informix you would be better off
choosing another RDBMS.
Very easy to install and use is sqlite3.
Not quite so easy to install, but i my opinion the very best of the open source RDBMS is
PostgreSQL (Especially if you plan on doing any GIS work).
And there are of course others, MySQL and more.
PostgreSQL is on par with Oracle, but it's free!
Reply
#7
Unfortunately yes. I have an application that uses the db and I want a similar setup to do some testing.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  qpython package error Creepy 4 1,006 Jul-06-2023, 05:58 PM
Last Post: Creepy
  when package built, requirements not installed sabuzaki 1 737 Apr-07-2023, 09:01 AM
Last Post: sabuzaki
  Visual Studio Code venv ibm_db error mesi1000 7 2,781 Nov-13-2022, 12:36 AM
Last Post: snippsat
  ibm_db install problem mesi1000 1 3,134 Oct-27-2022, 06:54 PM
Last Post: snippsat
  error : "Microsoft Visual C++ 14.0 is required. " Even its installed Barak 4 3,988 Oct-13-2021, 10:39 PM
Last Post: Underscore
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,614 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  countryinfo package error MarcusAurelius 4 2,821 Mar-20-2021, 05:42 PM
Last Post: deanhystad
  error with netcdf4 package damdam 0 1,825 Nov-18-2020, 06:44 PM
Last Post: damdam
  Error in code tensorflow is installed ErnestTBass 5 6,480 Nov-04-2020, 03:43 PM
Last Post: snippsat
  pip list to show all versions of a package installed pvbadiger05b 4 2,475 May-21-2020, 06:48 PM
Last Post: jameshonest

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020