How to incorporate environment from with python.

Chris Angelico rosuav at gmail.com
Sun Mar 22 13:06:11 EDT 2020


On Mon, Mar 23, 2020 at 3:24 AM Peter Otten <__peter__ at web.de> wrote:
>
> 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.

I think everything else is irrelevant, and this is the only part that
matters. Why are there two distinct builds of Python 2.6, accessed via
the exact same path? What's going on here?

(Also, Python 2.6 is quite quite old by now. One of them was built in
2012 and hasn't been updated since. Any chance of installing something
newer?)

ChrisA


More information about the Python-list mailing list