Install Python cx_Oracle on Solaris 11

Hey,.

I really did not expect what will be difficult:

Just install cx_Oracle on a Solaris 11 fresh box.

Python root@zion11:~#

Python 2.6.8 (unknown, 26 February 2014, 19:21:08) [C] on sunos5

Type "help", "copyright", "credits" or "license" for more information.

> > >

root@zion11:~# echo $ORACLE_HOME

/ opt/oracle/instantclient_11_2

root@zion11:~# echo $LD_LIBRARY_PATH

/ opt/oracle/instantclient_11_2

Very well, very well. Let's go to work:

# which pip

No pip in/usr/not bin/usr/sbin/opt/csw/bin/bin/sbin

# What easy_install

No easy_install in/usr/bin/usr/sbin/opt/csw/bin/bin/bin

Large. I am on the hardware of the Oracle, using a BONE of Oracle and pre installed python and just want to connect to my Oracle database. Why isn't cx_Oracle pre-installed in the first place? Or am I just missed a package pkg I could use?

But wait, fortunately, there OpenCSW.

# pkgutil python26 py_setuptools py_pip-i

root@zion11:~# pip install cx_Oracle

Download/unpacking cx-Oracle

Cx_Oracle - 5.1.3.tar.gz (104 kB) download: 104 KB downloaded

Running setup.py egg_info for cx-Oracle package

Installation of packages collected: cx-Oracle

Running setup.py install for cx-Oracle

"cx_Oracle" extension of construction

/opt/csw/bin/GCC-4.8-O2-pipe - m32-March = pentiumpro - fno-strict-aliasing-O2-pipe - m32-March = pentiumpro - DNDEBUG g - fwrapv-O3-wall - Wstrict-prototypes - cple--i/opt/oracle/instantclient_11_2/sdk/include-I/opt/csw/include/python2.7 - c cx_Oracle.c-o build/temp.solaris-2.11-i86pc.32bit-2.7-11g/cx_Oracle.o-DBUILD_VERSION = 5.1.3

Cannot run /opt/csw/bin/gcc-4.8: no such file or directory

error: command ' / opt/csw/bin/gcc-4.8' failed with exit status 1

All out of order /opt/csw/bin/python2.7 - c "import setuptools;__file__='/tmp/pip_build_root/cx-Oracle/setup.py';exec (compile (open (__file__) .read () replace ('\r\n', '\n'), __file__, 'exec')) ' install - record /tmp/pip-Cqt1z4-record/install-record.txt - single version-externally-managed by:

installation running

construction running

running build_ext

"cx_Oracle" extension of construction

creation version

creation build/temp.solaris-2.11-i86pc.32bit-2.7-11g

/opt/csw/bin/GCC-4.8-O2-pipe - m32-March = pentiumpro - fno-strict-aliasing-O2-pipe - m32-March = pentiumpro - DNDEBUG g - fwrapv-O3-wall - Wstrict-prototypes - cple--i/opt/oracle/instantclient_11_2/sdk/include-I/opt/csw/include/python2.7 - c cx_Oracle.c-o build/temp.solaris-2.11-i86pc.32bit-2.7-11g/cx_Oracle.o-DBUILD_VERSION = 5.1.3

Cannot run /opt/csw/bin/gcc-4.8: no such file or directory

error: command ' / opt/csw/bin/gcc-4.8' failed with exit status 1

----------------------------------------

Cleaning of...

Order /opt/csw/bin/python2.7 - c "import setuptools;__file__='/tmp/pip_build_root/cx-Oracle/setup.py';exec (compile (open (__file__) .read () replace ('\r\n', '\n'), __file__, 'exec')) ' install - record /tmp/pip-Cqt1z4-record/install-record.txt - single-version-externally-managed failed with the error code 1 to/tmp/pip_build_root/cx-Oracle

Store all information in /root/.pip/pip.log

Well, well, is not at all the installed version of the CCG.

root@zion11:~# what CCG

CCG

root@zion11:~# gcc - v

Read der von /opt/csw/lib/gcc/i386-pc-solaris2.10/4.9.0/specs specifications

COLLECT_GCC = / opt/CSW/bin/gcc

COLLECT_LTO_WRAPPER=/opt/CSW/libexec/gcc/i386-PC-solaris2.10/4.9.0/LTO-wrapper

Ziel: i386-pc-solaris2. 10

Konfiguriert mit: /home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-i386/build-isa-pentium_pro/gcc-4.9.0/configure--prefix = / opt/csw - exec_prefix = / opt/csw - bindir = / opt/CSW/bin--sbindir script configures = / opt/CSW/sbin - libexecdir = / opt/CSW/libexec - datadir = / opt/CSW/share - sysconfdir = / etc/opt/csw - sharedstatedir = / opt/CSW/sharing--localstatedir = / var/opt/csw - libdir = / opt/CSW/lib--infodir = / opt/CSW/share/info - includedir = / opt/CSW/include--mandir = / opt/csw/share/man-enable-cloog-backend = isl - enable-java-awt = xlib - enable-languages = ada , c, c++, fortran, java, go, objc--enable-libada--enable-libssp--enable-nls--enable-objc-gc--enable-threads = posix - program-suffix = - 4, 9 - with cloog = / opt/csw-with-gmp = / opt/csw--avec-inclus-gettext--avec-ld = / usr/ccs/bin/ld--sans-gnu-ld--avec-libiconv-prefix = / opt/csw - with mpfr = / opt/csw - with ppl = / opt/csw-with-system-zlib = / opt/csw--avec-gnu-as--avec-comme = / opt/CSW/bin/gas

Thread model: posix

GCC-Version 4.9.0 (CCG)

I can set it up anywhere?

Or maybe something else:

root@zion11:~# easy_install cx_Oracle

Looking for a cx-Oracle

Reading https://Pypi.Python.org/simple/cx_Oracle/

Reading http://CX-Oracle.sourceforge.NET

Reading http://Starship.Python.NET/crew/atuining

Better answer: cx-Oracle 5.1.3

Download https://Pypi.Python.org/packages/source/c/cx_Oracle/cx_Oracle-5.1.3.tar.gz#MD5=cd6ff16559cbc9c20087ec812c7092ab

Cx_Oracle treatment - 5.1.3.tar.gz

Writing /tmp/easy_install-9a7QmG/cx_Oracle-5.1.3/setup.cfg

Cx_Oracle-5.1.3/Setup.py - q bdist_egg - dist-dir /tmp/easy_install-9a7QmG/cx_Oracle-5.1.3/egg-dist-tmp-agKYF3 running

Cannot run /opt/csw/bin/gcc-4.8: no such file or directory

error: configure script completed with error: command ' / opt/csw/bin/gcc-4.8' failed with exit status 1

Okay, so let's try DIY.

root@zion11:~# cd /usr/src/cx_Oracle-5.1.2/

root@zion11:/usr/src/cx_Oracle-5.1.2# python setup.py build

construction running

running build_ext

"cx_Oracle" extension of construction

/usr/lib/python2.6/Pycc - DNDEBUG - KPIC--i/opt/oracle/instantclient_11_2/sdk/include-I/usr/include/python2.6 - c cx_Oracle.c-o build/temp.solaris-2.11-i86pc-2.6-11g/cx_Oracle.o-DBUILD_VERSION = 5.1.2

"GCC: unrecognized option '-KPIC '.

/usr/lib/python2.6/Pycc g build/temp.solaris-2.11-i86pc-2.6-11g/cx_Oracle.o-l/opt/oracle/instantclient_11_2-L/usr/lib - lclntsh - lpython2.6 o build/lib.solaris-2.11-i86pc-2.6-11g/cx_Oracle.so

LD: fatal: library - lclntsh: not found

LD: fatal: file processing errors. No output written to build/lib.solaris-2.11-i86pc-2.6-11g/cx_Oracle.so

collect2: ld returned 1 exit status

error: command ' / usr/lib/python2.6/pycc' failed with exit status 1

root@zion11:/usr/src/cx_Oracle-5.1.2# ls lhrt - /opt/oracle/instantclient_11_2/libclntsh.so.11.1

-rwxr-xr-x 1 root root 50 M 2 August 17:40 /opt/oracle/instantclient_11_2/libclntsh.so.11.1

Any ideas?

I built and installed cx_Oracle 5.1.1 for use on Solaris, but did not put in a package IPS - too many ongoing projects. This is fine on my todo list (as well as changes upstream).

In the meantime, here's what you need to know.

First of all - the wrapper pycc we ship in Solaris is written assuming that use Solaris Studio options to the compiler. That's why you have seen ' gcc: unrecognized option '-KPIC' "in the output above. To avoid this, install the Solaris Studio compiler-, it is available on the repository solarisstudio pkg.oracle.com; Please see Oracle Solaris Studio downloads for details.

Secondly - I had to create symbolic links by hand in the Oracle Instant Client directory after the installation of the archive. I don't know if you need to do when installing pkg://solarisstudio/developer/solarisstudio-123/library/oic-libs and pkg://solarisstudio/developer/solarisstudio-123/oic. One thing that the option Archive gives you the option to install the client libraries 64-bit as well.

Once I had the instant client bits installed, I ran the setup.py like this script:

$ ORACLE_HOME = / opt/oracle/instant_client_11_2 LD_LIBRARY_PATH = / opt/oracle/instantclient_11_2: python setup.py

Tags: Database

Similar Questions

  • Install OAS10g in sun solaris

    Hello
    I try to install OAS10g in Sun solaris Platform 9.

    I have a softaware OAS in one of my directory and the runInstaller is in another directory... (beca'z I have the 10g database in this directory...)

    Can someone tell me how I can install OAS_10g?


    Thanks in advance.

    Take a look at the installation guide:
    http://download.Oracle.com/docs/CD/B14099_19/Sol.1012/install.1012/install/TOC.htm

    Thank you
    Shail

  • Should I install python 3

    I started playing with python, mainly because I just installed Sagemath, also to play with. I see python 3.5.1 is out, considering that OS X python 2.7.1, and installation of python 3 seems simple enough; However; should I really bother to install it, or just stay with supplied with 10.11 python2?

    I use Zed Shaw's, Learn Python the Hard Way.

    Thank you

    Hello danuke,

    Python is what people call a "large can-o-worms. As I understand it, there are significant between the versions 2.7 and 3 differences. If you ever had to deal with how vs trouble 2.6 2.7 was, then you might think twice about 3.5.

    In any case, you should be aware that all of the Apple software, including the version of python from Apple, are off limits. All you want to do in Python, you must download your own version, even if it's the same as what ships with the operating system and use it. Apple's Python version should be used only Apple. From the point of view of the developer, it is basically paralyzed and unusable. Protection of the integrity of the system makes it impossible to install extensions and modules. And for the record, this notice applies only to Python either. You should download and build all your own software. Do NOT rely on the Apple software. You'll be sorry if you do.

  • Impossible to install python 3.5.1 on the computer that is running windows server 2007 sp2

    I can't install the interpreter python on this computer, and I am the administrator.  I don't know what to do.

    The community of open source, it has been said and now I'm confirming that Python is not supported by windows.

    It's my opinion unfair competition - http://ec.europa.eu/competition/consumers/index_en.html.

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Installation of ActiveState Tcl/Tk and Python 3.5.2

    I installed the package 3.5.2 Python from python.org and by their recommendation went to activestate.com and downloaded and installed recommended Tcl/Tk package. When IDLE was opened it gave a message that Tcl/Tk is unstable and it appeared that the version was provided with the operating system, not that of ActiveState.com. I have more information about what I did to Pixelistes.com here: questions about installing Python.

    The problem would be that I installed Python 3.5.2 until I installed the ActiveState Tcl/Tk? I found some information on when the dynamic linker chooses the Tcl/Tk framework (at the time of importation) to post a link but did not understand the consequences. I wonder if Python 3.5.2 installation before I installed the framework recommended Tcl/Tk due to the dynamic linker to link the Tcl/Tk by Apple instead. I might need to tell the linker to use the new framework. Any ideas appreciated.

    When you run idle, by default, this is/usr/bin/idle that is installed with OS X (El Capitan) as the Python 2.7.10 distribution. It was compiled to find the v8.5.9 of ActiveState Tcl that Apple continues to ship.

    When you installed Python 3.5.2 and I hope that you have not installed it on OS X Python existing, it was a precompiled binary distribution that cannot have been compiled about what anyone more than available executives of Tcl/Tk that were part of Mac OS X at the time. Even if you have run idle3 in this Python 3.5.2 distribution don't you may see no change in support of Tcl/Tk.

    When we install Python for a like Homebrew package manager, or alternatively, generates the source code, there are parameters of generation (for example - with-tcl-tk) that tell the source Python 3.5.2 code looking for executives of Tcl/Tk and use + 8.6.4 ActiveState libraries if they are. As idle3 is compiled at the time too, he knows that he has to use the most recent available Tcl/Tk framework. This is the case with my idle3.

    If you plan to build your own Python 3.5.2 you will need the latest tools of command line for (OS X El Capitan), and I encourage you to put the distribution in the tree/usr/local. I've patched and always use pythonbrew for several juggling Python distribution, as I installed v2.7.12 and 3.5.2. Two of these Python distributions I would build on ActiveState Tcl/Tk libraries.

  • Python is supported by windows?

    Why is python claimed not to be supported by Microsoft?

    See http://bugs.python.org/issue25947.

    Hello

    You can use Python, but why would it be supported by Microsoft.

    This is a 3rd party programming language and is a software open source.

    http://www.howtogeek.com/197947/how-to-install-Python-on-Windows/

    What is Python?

    https://www.Python.org/about/

    Open source

    Python is developed under OSI-approved open source license, making it usable, and freely distributable, even for commercial purposes. Python license is administered by the Python Software Foundation.

    @@@@@@@@@@@@@@@@@@@@@

    For any other question of server software:

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Python programs just become files in Notepad?

    I have installed python 2.6 on my computer and am learning to program with it. Curiously, when I make a program it does not open upward or work as a program.

    I finish by .py, of course, but he treats as if it were a text file? It works slow, but that's all. Any help would mean a lot. I'm using windows vista 32-bit to all who ask. If there is more info need, tell me and I'll try and suppy an answer. Thanks in advance for any help.

    Hello

     
    I suggest you run the program in compatibility mode and check if that helps. For more help, see the link.
     
    I hope this helps.
  • Python in Windows 7 installation problems

    Hello. I tried to install the Python on my laptop (Windows 7 Pro) language using the Installer MSI Windows x 86 3.2.2 Python from www.python.org. During the installation, I right click and install as an administrator. The command line works very well, but I am unable to get Idle GUI to load. He thinks about it for a few seconds while the blue circle icon appears, then nothing - not even an error message.

    I tried other versions of Python - e.g. ActivePython, with the same result. It does not seem to make a difference, what version of Python that I use. Any help gratefully received!

    Hello
     
    1. you use 32 bit OS or 64 bit one?
    2. What do you mean when you say "I am unable to get Idle GUI to load"? Are you talking about the GUI for the window or the window of the software installation when you try to run it?
     
    Python 2.6 (32-bit and 64-bit version) are compatible Windows 7. It is suggested to install Python 2.6. Please visit the following link for more information. Windows 7 Center compatibility:
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/details.aspx?type=software&p=Python&v=Python%20Software%20Foundation&UID=2&l=en&pf=0&PI=0&s=Python&OS=64-bit
     
     
    Method 1: Boot your system in clean boot mode, and then install python 3.2.2. Try now to the KB article to perform the clean boot.
    How to troubleshoot a problem by performing a clean boot in Windows Vista and Windows 7:
    http://support.Microsoft.com/kb/929135
    Note: After you used the clean boot in order to solve your problem follow step 7 to reset the computer to start as usual.
     
    Method 2: You may need to run the following troubleshooter to install and run Python 3.2.2.
    Open the program compatibility troubleshooting utility:
    http://Windows.Microsoft.com/en-us/Windows7/open-the-program-compatibility-Troubleshooter
     
    It will be useful.
  • Installation of Python on windows

    Hi all

    How to install Python 2.7.10 on windows...

    also, any documentation on that.

    Thanks in advance

    Lara

    did you check that

    https://www.Python.org/downloads/

    https://docs.Python.org/2/

    See you soon

  • Physics-conversion machine virtual Solaris

    Hi team,

    Can we do the physical to virtual machine conversion Solaris... Solaris server is Sun V445 Sun V210 models.

    Thanks in advance

    The V210 and the V445 are both SPARC and as such cannot be virtualized on vSphere, which only supports x 86.

    You will need to create a new virtual machine, install Solaris x 86 and install and search/install a version of Solaris x 86 for your application.

  • How to deploy the agent for solaris

    I have download for Windows Server and the Agent for Solaris.
    The server for windows successfully installed, but how to install the agent for solaris?

    The downloaded file is hyperic-hq-agent-3.1.4-EE-504-sparc-solaris.gz
    and when I unzip, it's just hyperic-hq-agent-3.1.4-EE-504-sparc-solaris.

    Any help is greatly appreciated.

    Hi Nemesis

    The file extension must be tgz, gz not, maybe your browser has changed.
    You can use this command:

    tar - zxvf hyperic-hq-agent-3.1.4-504-sparc-solaris.tgz

    Then use «./hq-agent.sh setup' to start and configure the agent.

  • How P2V Solaris (SPARC) to the Virtual Machine VMware x 86?

    Good evening everyone,

    I would like to know is possible to convert a physical Solaris server is running on a Sparc, to a VMware VM on a processor a x 86 platform. Y of the tools out there that do exist and can accomplish this?

    Thank you

    Steve

    Oracle's Web site has a couple. I wrote an article great admin on how to create areas of high availability (the short name of containers) to http://www.sun.com/bigadmin/content/submitted/ha_containers_zfs.jsp. You can check out http://www.sun.com/software/solaris/containers/faqs.jsp which has links to a lot of Solaris container information including how servers solaris 8/9 p2v.

    One thing to note on this subject, is that if you create the flar on a SPARC box, you need to install the image on a SPARC box. (that is to say physical SPARC Solaris 8 needs to be installed on a SPARC Solaris 10 zones and Solaris 8 containers installed package server.) The containers are not cross platform compatible.

  • Solaris 10 with ESX4

    Is it possible to install vmware tools in Solaris 10 running on ESX4? Compatibility Guide Guest said 3.X only. Specifically, I only need the tools to be able to display the IP address of the guest in the VI client operating system, could I install just verison 3.5 tools? If this is the case where I donwlod them I only have ESX4 host

    See you soon

    Hello.

    According to the online compatibility guide, this is supported.

    http://www.VMware.com/resources/compatibility/detail.php?device_cat=software&DEVICE_ID=11586 ~ 16 & release_id = 13

    http://www.VMware.com/resources/compatibility/detail.php?device_cat=software&DEVICE_ID=11587 ~ 16 & release_id = 13

    Good luck!

  • Personalized access Gate for tomcat in solaris 10 AMD 64

    I need write custom that accessgate in java, without installing SDK AccessServer in solaris 10 ADM64 server, is it possible?

    MOM you need to install the Asdk in a supported platform, configure the accessgate, politics to be able to develop a portal.

  • APEX facility under 10g and solaris

    Hello

    I intend to install Oracle APEX on solaris 10g system. There are two different 10g database resides on the same server with an Oracle Home and I want to install APEX on the two databases. Do I need to install the http server twice or how it will work. Can there be guidelines installation Installation of the APEX on solaris.

    Is there a way I can install APEX on the databases and access to other systems by using the links to the DB.

    Thank you
    Harinder

    Hello

    You need a single instance of HTTP server. In the data descriptor Access (DAD conf file), you need to refer to two instances of database.
    Example:

    Location/pls/apex >
    Order deny, allow
    Docs PlsqlDocumentPath
    AllowOverride None
    PlsqlMaxRequestsPerSession 10
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString 192.168.0.1:1521:db.com ServiceNameFormat
    PlsqlNLSLanguage RUSSIAN_CIS. UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    Apex PlsqlDefaultPage
    PlsqlDatabasePassword password
    Allow all the


    Order deny, allow
    Docs PlsqlDocumentPath
    AllowOverride None
    PlsqlMaxRequestsPerSession 10
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString elxe:1521:XE ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA. CL8MSWIN1251
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    Apex PlsqlDefaultPage
    PlsqlDatabasePassword password1
    Allow all the

    Configuration and installation of the APEX is the same as for Linux. See the installation documentation.

    Best regards, Kostya Proskudin

Maybe you are looking for