I'm using anaconda with Python3
I installed cx_oracle package using pip.
When I type import cx_Oracle
or run the code, the python interpreter recognizes the package and runs it, but for some reason the PyChram doesn't recognize the package and doesn't suggest me autocomplete.
As you see in the screenshot, the package name is cx-Oracle
instead of cx_Oracle
, so I looked for cx-Oracle
in the anaconda folder (and sub folders) and changed it to cx_Oracle
, but without success.
This could come from various sources, the main ones being listed below:
You probably do not have the Microsoft Visual C++ compiler.
Download Microsoft Visual C++ 2015 and install it.
Then restart Pycharm and check that your problem is solved.
If you use Anaconda, you probably have the SQLAlchemy package installed, which already contains instances of sql connectors (e.g. pyodbc.py, cx_oracle.py, ...). Uninstalling SQLAlchemy from the project interpreter listed package (for PyCharm, go to File -> Settings -> Project Interpreter) will help solving the conflicts with the filenames.
The following post could also help you solving your issue: Deploying cx_Oracle in Windows
Basically, the answer lists 4 different sources of the problem (including the missing C++ compiler or the need for an Oracle client to be installed).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With