【问题标题】:Building and Installing cx_Oracle with conda skeleton/ conda build not working使用 conda 骨架/ conda build 构建和安装 cx_Oracle 不起作用
【发布时间】:2017-12-07 18:12:20
【问题描述】:

我已经在我的 Windows 64 位机器上使用 conda 骨架命令在 Anaconda python 中安装了包 cx_Oracle

conda 骨架 pypi cx_Oracle

af5f7daad67d6820670d582dfc045/cx_Oracle-6.0rc1.tar.gz (200 KB) 用于 cx_Oracle。

下载 cx_Oracle

使用缓存下载

正在解压 cx_Oracle...

完成

当我检查文件/目录最终设置时,我看到它在那里

    File "C:\Anaconda3_version4.3\lib\site-packages\conda_build\skeletons\pypi.py", line 339, in skeletonize
    raise RuntimeError("directory already exists: %s" % dir_path)
RuntimeError: directory already exists: .\cx_oracle

但是当我调用它时,却找不到它

  import cx_oracle
Traceback (most recent call last):

  File "<ipython-input-3-fa7af752f8a0>", line 1, in <module>
    import cx_oracle

ModuleNotFoundError: No module named 'cx_oracle'

cx_Oracle 的目录包含文件, 并且知道我需要使用 conda build 构建包:

conda build cx_Oracle

就是这样,还是不行

向我提供以下错误:

Anaconda3_version4.3\conda-bld\cx_oracle_1499164
353203\_b_env\Library\include /Tcsrc/cx_Oracle.c /Fobuild\temp.win-amd64-3.6\Rel
ease\src/cx_Oracle.obj -DBUILD_VERSION=6.0rc1
error: command 'cl.exe' failed: No such file or directory

我不明白最终安装软件包还需要什么

感谢阅读。

【问题讨论】:

  • conda 骨架用于自动构建 conda 包。它不安装软件包。更多详情请参考文档:conda.io/docs/build_tutorials/…
  • 谢谢,但是它已经存在了,.\cx_Oracle 找到了,但现在我知道它没有安装
  • 我已经重写,重新提出问题。感谢您的帮助,在运行 conda build cx_oracle 后,我得到了描述的错误
  • 您有哪个 Oracle 客户端(例如 Oracle Instant Client)?对于那个版本的 Oracle 客户端,你有正确的 VS Redistributables 吗?
  • 不,我没有安装oracle客户端,你的意思是在我自己的电脑上安装oracle即时客户端,例如,

标签: python-3.6 conda pypi cx-oracle conda-build


【解决方案1】:

最后,感谢@darthbith 的 cmets,我得到了有关此错误的提示,

构建 cx_Oracle 需要您使用 C(++) 编译器,因为 cx_Oracle 是用 C 编写的,而不是 Python 编写的,即使它是一个 Python 模块。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-29
    • 1970-01-01
    • 2018-11-12
    • 1970-01-01
    • 2018-04-06
    • 1970-01-01
    • 2020-12-27
    相关资源
    最近更新 更多