Skip to content

Wont build on windows #668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
roda37 opened this issue Apr 10, 2024 · 4 comments
Closed

Wont build on windows #668

roda37 opened this issue Apr 10, 2024 · 4 comments

Comments

@roda37
Copy link

roda37 commented Apr 10, 2024

Untitled

I keep getting this message, I am not very good with windows but I am pretty sure I've installed the build tools and every known C++ package both x86 and 64 and it still wont build the package, any help?

@cjbj
Copy link
Member

cjbj commented Apr 10, 2024

The common root cause is trying to use cx_Oracle with versions of Python that were released after cx_Oracle 8.3 itself was released. I.e. Pre-built cx_Oracle binaries packages are not available for those Python versions. The best solution in this case is to upgrade cx_Oracle so the new version's pre-built binary packages install directly without you needing to compile. See the original release announcement for the upgrade.

@roda37
Copy link
Author

roda37 commented Apr 10, 2024

The common root cause is trying to use cx_Oracle with versions of Python that were released after cx_Oracle 8.3 itself was release. I.e. Pre-built cx_Oracle binaries packages are not available for those Python versions. The best solution in this case is to upgrade cx_Oracle so the new version's pre-built binary packages install directly without you needing to compile. See the original release announcement for the upgrade.

The main reason why I use this client instead of the new oracledb client is because the new one does not support old databases, when you run the script with this new library you will always get this:

DPY-3010: connections to this database server version are not supported by python-oracledb in thin mode

The old one (cx_Oracle) works with Oracle Database 11g that I have deployed here, which cannot be upgraded or changed. Hey I'm just trying to do my job :). Could you perhaps point me to the prebuilt packages, or could it be built with mingw?

On Linux cx_Oracle works really nice, yes it's annoying to have a client installed but as long as it works it's fine. On Windows however it will fail no matter what. I don't know anything about packaging on pip, perhaps someone here does so it can be fixed.

@cjbj
Copy link
Member

cjbj commented Apr 10, 2024

The new driver, python-oracledb, works fine with Oracle DB 11gR2: you just need to add a call to init_oracle_client() in your scripts so the Oracle Client libraries are linked, just like they always were with cx_Oracle. The Thick mode is now optional in python-oracledb, but was the only choice with cx_Oracle.

@cjbj
Copy link
Member

cjbj commented Apr 23, 2024

Closing - no update

@cjbj cjbj closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants