FreeBSD + Python + Oracle

Dima Dorfman dima at trit.invalid
Tue Nov 21 05:55:46 EST 2006


On 2006-11-21, Vyacheslav Sotnikov <bsdforfree at rambler.ru> wrote:
> is anybody has any success in taking this components live together? I
> need to access remote Oracle 9i from freebsd 6.2 machine using python
> 2.4.4. Thanks in advance for answer.

Yes, I've done this before. You'll have to run Python on FreeBSD but
using the Linux ABI ("Linuxulator" or "Linux emulation"). It's a bit
of a pain to set up, but it works well after that.

The basic procedure is:

  - Load the linux module and install the linux-base and -devtools ports

  - Install the Linux Oracle client and get it working enough that you
    can run sqlplus

  - Compile Python for the Linux ABI (you'll have to install all the
    appropriate linux libraries if you need extension modules like
    gzip, readline, etc.)

  - Compile the Oracle extension modules. I've successfully used
    DCOracle2 and cx_Oracle in this scenario.

That should be it, but it's been a while since I had to do it and I
might've missed some steps.

All of the above is okay if you want to run FreeBSD because you like
FreeBSD; it doesn't help if you want to do it because you need to use
some library that's only available for FreeBSD. In that case, you can
probably manage some kind of IPC between Linux-Python-on-FreeBSD and
FreeBSD-Python-on-FreeBSD.



More information about the Python-list mailing list