oracle + python + pycharm + win problem-solving system

1.:::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::: :( note that according to my version, the database according to the company)

Computer specify the installation oracle is oracle.11 (or download the package online to find their own official website)

python installation to 3.6.5 (accustomed)

pycharm random (just to write code)

cx_oracle installation URL https://pypi.org/project/cx-Oracle/5.3/#files     (5.3)

According to my question above version should be nothing a problem to find Google

2.:::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::: :( encounter oracle version installed environmental solutions inexplicable)

A problem:. Import cx_Oracle as cx ImportError: DLL load failed:% 1 is not a valid Win32

  After the installation is complete, locate the following two files according to your installed Oracle directory and copy: 
Write pictures described here
Write pictures described here

 

 Copy the above two files to your root directory to install the Python example, I copy these two files to the root directory of my Python:

Or put in D: \ python3.6 \ Lib \ site-packages next

The program will then run the python problem 2 cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle

 

二.问题:cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle

  Open URL https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html  (download what you register, do not bother)

  Download instantclient-basic-win32-11.1.0.7.0.zip (according to their own version to download)

  

 

  Then extract the files to copy Select the root directory of your Python \ Lib \ site-packages (figure below)

  

Write pictures described here

 

Then restart pycharm re-run the code, if there is not an error message! Do not look for Google to comment on their

 

Guess you like

Origin www.cnblogs.com/xdlzs/p/11357042.html