Skip to content

Commit f26f2aa

Browse files
Update Installation Instructions for Python ibm_db on z/OS (#995)
* Update z/OS-specific Python ibm_db installation instructions Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com> * Update python version of z/OS documentation Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com> --------- Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com>
1 parent e993305 commit f26f2aa

1 file changed

Lines changed: 55 additions & 6 deletions

File tree

INSTALL.md

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Below steps were followed for the same:
126126
1. Tested under below:
127127
```
128128
-- zODBC(64 bit) installed with z/OS 2.3
129-
-- IBM Python 3.11.3 64 bit
129+
-- IBM Python 3.13.0 64 bit
130130
-- Install the below PTFs(If not installed):
131131
-- UI72588 (v11)
132132
-- UI72589 (v12)
@@ -281,27 +281,76 @@ Now that the Python and ODBC is ready, for connecting to Db2 you need a Db2 Pyth
281281
282282
Follow the standard steps for the same i.e. pip3 install ibm_db
283283
284-
### 2.5 Install python-ibm_db
284+
### 2.5 Install python-ibmdb
285285
286-
Below are the steps to install [*python-ibm_db*](https://github.com/ibmdb/python-ibm_db) from github or pip.
286+
Below are the steps to install [*python-ibmdb*](https://github.com/ibmdb/python-ibmdb) from github or pip.
287287
288288
#### 2.5.1 Direct Installation.
289289
```
290290
pip install ibm_db
291+
or
292+
pip install --no-build-isolation ibm_db
291293
```
292294
or
293295
```
294296
pip install git+https://git@github.com/ibmdb/python-ibm_db.git
295297
```
298+
In case you encounter the following error during the installation process:
299+
```
300+
error: command '/usr/lpp/IBM/oelcpp/v2r0/bin/clang' failed: EDC5129I No such file or directory.
301+
```
302+
This issue may arise due to the absence of the required clang compiler. To resolve this, you can use the following alternative commands:
303+
```
304+
CC="ibm-clang64" pip install ibm_db
305+
```
306+
or
307+
```
308+
CC="ibm-clang64" pip install --no-build-isolation ibm_db
309+
```
296310
297311
#### 2.5.2 Manual Installation by using git clone.
298312
313+
Before starting the manual installation, ensure you have the latest versions of the required modules installed. Run the following command to install them:
314+
```
315+
pip install setuptools build wheel
316+
```
317+
Next, clone the python-ibm_db repository from GitHub:
318+
```
319+
git clone https://github.com/ibmdb/python-ibm_db.git
320+
```
321+
After cloning the repository, navigate to the python-ibmdb directory and tag all the files with the ASCII tag:
299322
```
300-
git clone https://github.com/ibmdb/python-ibm_db/
301323
cd python-ibmdb
302-
python setup.py build
303-
python setup.py install
324+
chtag -Rtc 819 .
325+
````
326+
Now, you can build the package using the following command:
327+
```
328+
python -m build
329+
````
330+
In case you encounter the following error during the installation process:
331+
```
332+
error: command '/usr/lpp/IBM/oelcpp/v2r0/bin/clang' failed: EDC5129I No such file or directory.
333+
```
334+
This issue occurs due to the absence of the required clang compiler. To resolve it, use the following alternative command to build the package with the ibm-clang64 compiler:
335+
```
336+
CC="ibm-clang64" python -m build
337+
````
338+
After building the package, navigate to the dist directory where the .whl file is generated:
339+
```
340+
cd dist
341+
````
342+
Now, install the .whl file (the wheel file) using pip. Replace nameofwheelfile.whl with the actual name of the wheel file generated:
343+
```
344+
pip install nameofwheelfile.whl
345+
346+
for example:
347+
pip install ibm_db-3.2.5-cp313-cp313-os390_29_00_3931.whl
348+
````
349+
Finally, verify that the installation was successful by running:
350+
```
351+
pip list
304352
````
353+
This will show the installed packages, and you should see ibm_db listed among them.
305354
306355
Now assuming everything went fine. You can run a test program i.e. **odbc\_test.py** with below content to validate if the setup has been done perfectly i.e. bash-4.3$ python3 odbc\_test.py:
307356

0 commit comments

Comments
 (0)