Raspberry pi No module named 'cx_Oracle'

痴心易碎 提交于 2019-12-24 23:22:57

问题


I want to use the raspberry pi to send values to the Oracle11g database, but when I run import cx_Oracle syntax for that process, I get the following error:

Traceback (most recent call last):
  File "/home/pi/20190222ex01.py", line 1, in <module>
    import cx_Oracle
  File "/usr/lib/python3/dist-packages/thonny/backend.py", line 317, in _custom_import
    module = self._original_import(*args, **kw)
ImportError: No module named 'cx_Oracle'

How can I solve this problem?


回答1:


There is no ARM port of the Oracle Client libraries that are needed by cx_Oracle. You'll have to use something like REST calls from Python to a mid-tier server (in whatever language you like) running on an operating system that will support connection to the Oracle DB.




回答2:


It means, that you have not installed module cx_Oracle.

First you must install Oracle driver with PIP:

python -m pip install cx_Oracle --upgrade

Hope it helped you.



来源:https://stackoverflow.com/questions/55043656/tell-me-how-to-use-a-raspberry-pi-to-store-values-in-the-database-through-an-ora

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!