简体   繁体   中英

I get “DPI-1047: 64-bit Oracle Client library cannot be loaded” if I run program in PyCharm using Vagrant(venv)

I can't solve this problem when I run my test.py in Pycharm IDE previously configured to work with Vagrant machine and I get this error. I use Virtual Env there. Weird thing that I don't have problems when I run it manually into my machine via ssh (python test.py).

Here's code of test.py:

import cx_Oracle

host = '10.210.1.15'
port = 1521
sid = 'ORCL'
user = 'repdb'
password = 'rep1'

sql = 'select id from db.device_group dg'
dsn = cx_Oracle.makedsn(host, port,sid)
conn = cx_Oracle.connect(user, password, dsn)
cur = conn.cursor()
cur.execute(sql)
data = cur.fetchall()

print(data)

Take a look at the recently enhanced installation documentation found here . From your description it would appear that some configuration is missing in your Vagrant/venv environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM