How to incorporate environment from with python.

Peter Otten __peter__ at web.de
Sun Mar 22 12:22:54 EDT 2020


Antoon Pardon wrote:

> I think I can best explain what I want by showing two bash sessions:

> Python 2.6.4 (r264:75706, Sep  9 2015, 15:05:38) [C] on sunos5
> ImportError: No module named cx_Oracle

> Python 2.6.7 (r267:88850, Feb 10 2012, 01:39:24) [C] on sunos5
>>>> import cx_Oracle
>>>>

> As you can see the import works in the second session because I
> had done the needed assignments and exports in bash.

These seem to be different python interpreters. Maybe you just need to 
install cx_Oracle with the first one, or append the path containing 
cx_Oracle.so or whatever it's called to sys.path.




More information about the Python-list mailing list