0

I have tried upgrading pip, installing/upgrading setup tools, a lot of these simple things suggested on here. Can anyone help? Thanks,

I've been able to install every other python library without issue.

Collecting ibm_db==3.0.3 Using cached ibm_db-3.0.3.tar.gz (794 kB) ERROR: Command errored out with exit status 1:

TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Jose Miquel
  • 17
  • 1
  • 6
  • Which Db2 client did you install? How? Does it run? Did you configure it? EDIT your question , don't use comments. – mao Feb 25 '21 at 19:23

1 Answers1

1

The evidence is:

sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The python ibm_db module by default will try to download from IBM the tiny footprint db2cli driver. This is what is failing in your case.

This failure can be either a configuration error (on your environment, or your network), or it can be that the IBM website that hosts the db2cli package is temporarily unavailable. More suggestions here. Remember that the db2cli driver is independent of python ibm_db, and can be separately installed.

But, if you already have installed a Db2 CLI driver on your workstation, then you can tell python ibm_db to not download db2cli during pip install ibm_db by setting the IBM_DB_HOME environment variable before running the pip install ibm_db. This is documented on the python ibm_db homepage on github, which you should read. You can download and install a Db2 CLI driver from the IBM website ('Passport Advantage') or you can get a CLI driver from your Db2 DBA at your site. If you already installed a Db2-server on your MS-Windows workstation the it already includes the full Db2 CLI client.

So there are 4 possible CLI drivers from IBM you can use with python ibm_db, (1) the full Db2-client (2) the Db2 runtime client (3) the db2cli tiny footprint client, (4) ( for connecting to i-series AS/400 only, the IBM i access odbc package. Any of these can be pre-installed and pre-configured before installing python ibm_db as long as you set the IBM_DB_HOME variable before running pip install ibm_db.

Before python ibm_db can connect to a Db2 database, there must exist at least one Db2 CLI driver on your PATH. You can install and configure a Db2 CLI driver independently of python ibm_db if you wish to avoid install-time dependencies on the db2cli driver.

mao
  • 11,321
  • 2
  • 13
  • 29
  • You have not specified the commands you ran, or which Db2-client you installed. EDIT your question to add those details. Don't use comments. – mao Feb 25 '21 at 19:07