I Have created Exe Using Pyinstaller.How to bundle Cx_racle into this - python-3.x

My Script is having import cx_oracle where it is connecting to Oracle DB and doing some action. I have created exe for Windows machine using pyinstaller and tried to achieve same in my machine it is working properly. When I tried in another machine without installing python it is throwing an error like below.
Please help how can I overcome this issue.
Error:
cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help
[1856] Failed to execute the script

Hi Finally after long time trial and error. Found the resolution.
the machine where you want to run the stand-alone application that is using cx_Oracle please follow below steps for windows:
1.Download the instant client form the below URL.
https://oracle.github.io/odpi/doc/installation.html.
2. Unzip it and copy the path set it in Environment Variable.
3. After this, I have executed exe its worked fine foe me.

Related

How To access Cx_Oracle on Pivotal cloud factory (PCF)

I am trying to deploy my Python code where it involves usage of Oracle connection using cx_oracle module.
I referred the below link to set up my LD_LIBRARY_PATH
Deploy instant oracle on Pivotal CloudFoundry for cx_Oracle
export LD_LIBRARY_PATH=C:/Users/pm/Documents/project_1/oracle/instantclient_19_9:${LD_LIBRARY_PATH:-}
export OCI_LIB_DIR=C:/Users/pm/Documents/project_1/oracle/instantclient_19_9
export OCI_INC_DIR=C:/Users/pm/Documents/project_1/oracle/instantclient_19_9/sdk/include
Still facing same issue once code is pushed on to PCF.
[ERR] cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory".
I have downloaded the oracle client zip file for windows 64bits 19.9 version.
And unzipped into the folder in my desktop path where my application is stored and used to push the code to pcf(C:/Users/pm/Documents/project_1/).
Could someone please guide me if any of the steps need modification and help me fix the issue.
On Windows the environment variable you want to manipulate is PATH. If that doesn't help, you can also use the environment variable DPI_DEBUG_LEVEL and set that to the value 64. That will show you all of the paths that are being tried.
You can see all of this in the installation manual.

Unable to connect using cx_Oracle in a Jupyter notebook on VSCode

I keep getting the following error when I try to execute the cell in a Jupyter notebook on VSCode
con = cx_Oracle.connect("/#DB")
DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help
But the same works fine when I run it in Jupyter Lab.
Sometimes stuff just doesn't work in some IDEs, i am not sure what your question is, i suggest using anaconda (and maybe spyder specifically) it has worked for me with everything so far, but i don't know about cx_Oracle.
If you are using Oracle Instant Client, and it is the only Oracle software on the computer, then use the ldconfig command to set the library search path. This is always less error prone than trying to set LD_LIBRARY_PATH. See the Instant Client installation instructions.

Anaconda says unable to create process on windows10

I have installed Anaconda3 on my Windows 10 machine. Installation complete all fine. Then i added the in %PATH%. But when I am trying to launch anaconda prompt it says that
Unable to create process using 'C:\Users\anjaneya\Anaconda3\python.exe C:\Users\anjaneya\Anaconda3\Scripts\conda-script.py ..checkenv "cmd.exe" "C:\Users\anjaneya\Anaconda3"'
Not sure what is wrong. Please help.
Many Thanks,
I recently encountered the same problem as you. After some groping, I solved it.
You can try the following method:
Open cmd in this directory
C:\Users\anjaneya\Anaconda3\python.exe C:\Users\anjaneya\Anaconda3\Scripts
then input:
>conda list
Then I found out that my program is working properly.
I hope I can help you

How to fix error when installing node.js on windows 7 32bit

For the Screenshot
http://imgur.com/a/ly9SJ
I can't install node.js [node-v6.10.3-x86.msi], and i trying to search at stackexchange and find this one:
node.js Setup Wizard ended prematurely
After i follow the instruction and try to "running the MSI" via command prompt as Administator but fails.
I try to deleting some registry like this HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib_V2Providers but didn't take effect
And this the Logs on the installation
So what should i do? Thanks a lot

Linux Autotest: AttributeError

I just started trying Autotest for Linux kernel. I installed Ubuntu 16.04 into VirtualBox. And then downloaded autotest and the linux developer package.
When I run the included tests I get errors similar to "AttributeError: xxx object has no attribute yyy". There is a lot of them! I expected it to work straight out of the box.
The only step that I skipped was setting up the host side. I am wondering if it is the source of my errors. The docs say to run the host side once to set everything up. But I don't want to connect to the cloud etc ... Can I just run everything on the client side? Is there a way to set it up to run client only?
Any packages that I am missing?
Thanks!

Resources