Cx_freeze. Error with Cx_oracle client when running the program on another computer

Asked

Viewed 16 times

0

I developed a GUI program using Pyqt5 for users to feed a "Mysql" database (which is installed on a server on the same network as other computers).

However this program needs to get information from another database server, which is Oracle, so I installed the "cx_oracle" by Pip and downloaded "instantclient_19_11" leaving in the directory C: from my micro and also put in windows environment variables.

I entered at the beginning of the code "intantclient".

import cx_Oracle

cx_Oracle.init_oracle_client(lib_dir="C:\instantclient_19_11") 

After this done I managed to connect with the oracle database perfectly!!

Finishing the development I created an executable file with cx_freeze

To do this I created the file below to

from cx_Freeze import setup, Executable

files = ['icone.ico']

target = Executable(
    script = 'main.py',
    base = 'Win32GUI',
    icon = 'icone.ico'
)

setup(
    name = 'Digitação de Dados',
    version = '1.0',
    description = 'Programa teste',
    author = 'Rafael',
    options = {"build_exe" : {'include_files' : files}},
    executables = [target]
)

However when trying to open the executable on another computer (from the same network) appeared the error below, as if the version of the oracle client is not supported:

inserir a descrição da imagem aqui

Even putting the instantclient_19_11 in the directory C: on the PC I’m doing the test does not work!

I have Python 3.9 installed, and used a virtualenv

I tried using pyinstaller to package the files but it didn’t work...

Could someone help me? You need to insert the instantclient into the setup.py (cx_freeze) to make it work?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.