Python 在Windows 7上安装cx_Oracle时出错

Python 在Windows 7上安装cx_Oracle时出错,python,oracle,cx-oracle,Python,Oracle,Cx Oracle,TypeError:不支持的Python数据类型:文件 : [9]中的:导入cxOracle 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 导入cx_Oracle ImportError:DLL加载失败:%1不是有效的Win32应用程序。 : C:\Users\system.labuser>pip安装cx\u Oracle 收集甲骨文 使用缓存的cx_Oracle-5.2.1.tar.gz 从命令python setup.py egg_info完成输出: 回溯: 文件“”,第1行,在

TypeError:不支持的Python数据类型:文件

:

[9]中的
:导入cxOracle
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
导入cx_Oracle
ImportError:DLL加载失败:%1不是有效的Win32应用程序。
:

C:\Users\system.labuser>pip安装cx\u Oracle
收集甲骨文
使用缓存的cx_Oracle-5.2.1.tar.gz
从命令python setup.py egg_info完成输出:
回溯:
文件“”,第1行,在
文件“c:\users\system~1.lab\appdata\local\temp\pip-build-5bnyuh\cx-Oracle\setup.py”,第170行,在

raise DISTUTILSETUPERROR检查您使用的Python类型是32位还是64位。然后转到PyPI()并下载正确的版本(正确的Python版本和32位或64位,具体取决于您使用的Python)。预构建的二进制文件应该可以解决第一个问题


您还需要确保已安装Oracle客户端,并且该客户端位于您的路径中。您可以从此位置()获取Oracle instant client,并按照该页面上的说明进行操作。同样,根据您使用的Python和cx_Oracle的版本,确保下载32位或64位。所有内容必须匹配,否则您将发现您注意到的问题。

对于cx\U Oracle邮件列表,这可能是一个更好的问题:
In [9]: import cxOracle
Traceback (most recent call last):

  File "<ipython-input-9-d1ecebcba3d2>", line 1, in <module>
    import cx_Oracle

ImportError: DLL load failed: %1 is not a valid Win32 application.
C:\Users\system.labuser>pip install cx_Oracle
Collecting cs_Oracle
  Using cached cx_Oracle-5.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback <most recent call last>:
      File "<string>", line 1, in <module>
      File "c:\users\system~1.lab\appdata\local\temp\pip-build-5bnyuh\cx-Oracle\setup.py", line 170, in <module>
        raise DistutilsSetupError<"cannot locate an Oracle software " \
    distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\system~1.lab\appdata\local\temp\pip-build-5bnyuh\cx-Oracle\