# Exception while installing IBM db with python

**URL:** <https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859>\
**Category:** Python\
**Created:** [21 October 2020 14:06 UTC](https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859 "2020-10-21T14:06:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@Gaurav](https://forum.robotframework.org/u/Gaurav)\
**Post date:** [21 October 2020 14:06 UTC](https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859/1 "2020-10-21T14:06:36Z")

</div>

Hi,  
I am facing issue while installing ibm db with python. Please do let me know, how to resolve this issue.  
Command: pip install ibm\_db  
Python version: 3.6.7  
Exception:  
Collecting ibm\_db  
Using cached [https://files.pythonhosted.org/packages/6f/4e/48bf113d4f14b20a5008ea9f7784654041d8f7730c1081b370f569d80c93/ibm\_db-3.0.2.tar.gz](https://files.pythonhosted.org/packages/6f/4e/48bf113d4f14b20a5008ea9f7784654041d8f7730c1081b370f569d80c93/ibm_db-3.0.2.tar.gz)  
Complete output from command python setup.py egg\_info:  
Detected 64-bit Python  
Downloading [https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc\_cli/ntx64\_odbc\_cli.zip](https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip)  
Traceback (most recent call last):  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py”, line 1318, in do\_open  
encode\_chunked=req.has\_header(‘Transfer-encoding’))  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 1239, in request  
self.\_send\_request(method, url, body, headers, encode\_chunked)  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 1285, in \_send\_request  
self.endheaders(body, encode\_chunked=encode\_chunked)  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 1234, in endheaders  
self.\_send\_output(message\_body, encode\_chunked=encode\_chunked)  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 1026, in \_send\_output  
self.send(msg)  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 964, in send  
self.connect()  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 1392, in connect  
super().connect()  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 940, in connect  
self.\_tunnel()  
File “c:\users\a1029532\appdata\local\programs\python\python36\lib\http\client.py”, line 919, in \_tunnel  
message.strip()))  
OSError: Tunnel connection failed: 400 Bad Request

```python
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\A1029532\AppData\Local\Temp\pip-install-t916jcni\ibm-db\setup.py", line 207, in <module>
    file_stream = BytesIO(request.urlopen(url, context=context).read())
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 526, in open
    response = self._open(req, data)
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 544, in _open
    '_open', req)
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "c:\users\a1029532\appdata\local\programs\python\python36\lib\urllib\request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error Tunnel connection failed: 400 Bad Request>

----------------------------------------

```

Command “python setup.py egg\_info” failed with error code 1 in C:\Users\A1029532\AppData\Local\Temp\pip-install-t916jcni\ibm-db\

Please suggest something to resolve this issue, I am blocked due to this issue.

Thanks,

---

<div class="post-metadata">

**Author:** ![serici](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/serici/32/446_2.png) [@serici](https://forum.robotframework.org/u/serici)\
**Post date:** [21 October 2020 15:11 UTC](https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859/2 "2020-10-21T15:11:59Z")

</div>

Hi @Gaurav

either it is not robotFramework related or it happens only on a machine with robot Framework installed

if it’s the case i suggest you to use [virtual env](https://python-guide-pt-br.readthedocs.io/fr/latest/dev/virtualenvs.html) in python to isolate the environnement

hope this help or i do not have understood your question

Casper

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [22 October 2020 10:06 UTC](https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859/3 "2020-10-22T10:06:17Z")

</div>

> [@Issue in installing ibm\_db with pip](https://forum.robotframework.org/t/issue-in-installing-ibm-db-with-pip/692/4):
>
> Try if you can actually download the url that fails with like curl or wget by using same proxy settings. If that fails, it’s probably your proxy messing up. And with those tools you might have some options to debug why it might fail. Or install manually and modify the url in setup.py to something that your proxy can access.

As explained in that thread, your network setup is most likely culprint for the issue - 0 chance that this has anything to do with robot framework.

One option, which i already mentioned is (_install manually and modify the url in setup.py to something that your proxy can access_):

1. download the release.
2. unpack the source release to a directory
3. fix the issues in setup.py

Worth checking is http\_proxy and https\_proxy environment variables …

---

<div class="post-metadata">

**Author:** ![Gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@Gaurav](https://forum.robotframework.org/u/Gaurav)\
**Post date:** [4 November 2020 15:31 UTC](https://forum.robotframework.org/t/exception-while-installing-ibm-db-with-python/859/4 "2020-11-04T15:31:35Z")

</div>

I tried to install same in VDI environment. Also taking care for Proxy Server issue. But still not able to install ibm\_db library. I may agree that this issue is not directly related to Robot Framework but i am following same instruction as mentioned in Robot Framework guide and using same command as available on python website.

![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/754e179ceb0ce0a9b5eb18003d0edac650f1bbc5.png)

Please provide some solution.

Thanks,
