6 Replies Latest reply: Dec 19, 2009 9:56 AM by dbaktiar RSS

    cx_Oracle installation on Windows - silent failure

    103122
      I just had a surprisingly hard time getting cx_Oracle 5.0.2 installed on a new Vista machine (with Oracle Client 11.1.0.7, Python 2.6) using the windows .msi installer. Eventually, I managed to get it installed only when all the following were true:

      - Running as Administrator
      - ORACLE_HOME set in Environment Variables (Computer => Properties => Advanced System Settings). Simply issuing "set ORACLE_HOME=c:\app\product\11.1.0\client_1" from the command prompt does not seem to do it.
      - Any previous failed installations must be removed, not simply repaired.

      If any of these are not true, the installation still appears to work - the installer runs and completes without complaint. Trying to actually "import cx_Oracle", however, gives

      ImportError: No module named cx_Oracle

      I'm posting this here because, without an error message from the installer or any mention in the documentation or the README, this seems like the sort of sneaky problem that could make newbie Python users quit in frustration. (Also, I'll be able to find it here myself...)

      Edited by: catherinedevlin on Jun 26, 2009 11:50 AM

      Edited by: catherinedevlin on Jun 26, 2009 1:50 PM
        • 1. Re: cx_Oracle installation on Windows - silent failure
          cj
          Thanks Catherine!
          • 2. Re: cx_Oracle installation on Windows - silent failure
            122352
            Many thanks !

            Regards
            Friedhold
            • 3. Re: cx_Oracle installation on Windows - silent failure
              571706
              Thank you. Your post helped me look in right direction.

              I have
              Windows XP, Python 2.6, Django 1.1, Oracle client 9.2 and 10.2, cx_Oracle 5.0.2 (for Oracle 10) on my computer.

              Issue was i did not have ORACLE_BASE=C:/oracle and ORACLE_HOME=C:\oracle\10.2 defined as env variable.
              Also, the path had both 9.2 and 10.2 defined.

              When i ran server it gave: DLL not found even though it exists. Once i removed all 9.2 entries from my env variables it worked like a charm.

              I am still a newbie and trying to get data out from oracle db using python/django.
              • 4. cx_Oracle installation for Django on Windows
                730457
                I am also trying to use cx_oracle module with python & django. The module installed without any problem but
                while running the server, I am getting following errors
                Validating models...
                Unhandled exception in thread started by <function inner_run at 0x00D17970>
                Traceback (most recent call last):
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\core\management\commands\runserver.py", line 48, in inner_run self.validate(display_num_errors=True)
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\core\management\base.py", line 249, in validate num_errors = get_validation_errors(s, app)
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\core\management\validation.py", line 22, in get_validation_errors from django.db import models, connection
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\db\__init__.py", line 41, in <module> backend = load_backend(settings.DATABASE_ENGINE)
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\db\__init__.py", line 17, in load_backend return import_module('.base', 'django.db.backends.%s' % backend_name)
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\utils\importlib.py", line 35, in import_module __import__(name)
                File "C:\Documents and Settings\tbodha\Desktop\django\Python26\Lib\site-packages\django\db\backends\oracle\base.py", line 25, in <module> raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e)
                django.core.exceptions.ImproperlyConfigured: Error loading cx_Oracle module: DLL
                load failed: The specified procedure could not be found.


                can anybody point me which configuration value, I am missing?

                Thank you.

                Edited by: 3nath on Oct 27, 2009 7:37 AM
                • 5. Re: cx_Oracle installation for Django on Windows
                  dbaktiar
                  Hi,

                  I believe that you miss the Visual C++ Runtime library.
                  You need it in your system (the .DLL).

                  Daniel Baktiar

                  Edited by: dbaktiar on Dec 19, 2009 7:55 AM
                  • 6. Re: cx_Oracle installation for Django on Windows
                    dbaktiar
                    You might need to install the file: vcredist_x86.exe (or the x64 version) in case you haven't installed the runtime from some other application packages.

                    You might be able to download from this site:
                    http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

                    Edited by: dbaktiar on Dec 19, 2009 7:55 AM