'Can't import oracle into Spyder for Python

I've been trying to connect to a few oracle databases through Python/Spyder, but I've been having running into issues.

I currently have installed:

  • Spyder IDE 5.2.2
  • Python 3.7.9
  • Oracle Client 19.0.0
  • Windows 10 20H2

I've run import cx_Oracle, but I get the following error message: ModuleNotFoundError: No module named 'cx_Oracle'. I also tried this one in IDLE Shell 3.8.10 and got the same error.

pip3 install cx_Oracle results in a syntax error.

I don't have the ability to see what my environment paths are since work blocks the ability, but could reach out to the tech team if the issues is sitting there.

Thanks.



Solution 1:[1]

Check the official module page on pypi website: https://pypi.org/project/cx-Oracle/

Top-left states pip install cx-Oracle, so everything would be ok if you replace the underline.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Filippe O. Gonçalves