【问题标题】:Using MacPorts-installed Python packages with Enthought(or some other) Python on OS X?在 OS X 上使用 MacPorts 安装的 Python 包和 Enthought(或其他)Python?
【发布时间】:2012-04-16 20:09:46
【问题描述】:

我在我的 Mac 上安装了两个 Python 2.7.2(来自 MacPorts 和 Enthought)。我使用 Enthought Python 作为主要的;然而,MacPorts 发行版有几个额外的包,如 pymacs、rope 等,我想将它们提供给 Enthought Python。 (我实际上是在尝试使用带有 Enthought Python 的 Emacs,但也使用 MacPorts 安装的 Rope,Pymacs 来完成 Emacs 中的代码)。

有没有一种干净的方法可以在不破坏任何东西的情况下让 Enthought Python 可以使用 MacPorts 包?

【问题讨论】:

    标签: python macos emacs macports enthought


    【解决方案1】:

    尝试组合这两个发行版是有风险的,因为您可能会遇到冲突(特别是对于链接到略有不同版本的共享库的 C 扩展)。这是 EPD 出现问题的常见原因:

    https://support.enthought.com/entries/22094157-OS-X-Conflict-with-installed-packages-in-earlier-Python-installation

    在 EPD 中安装新软件包的推荐方法是使用 enpkg 工具。您可以通过enpkg --help 或在本文中了解更多关于 enpkg 的信息:

    https://support.enthought.com/entries/22415022-Using-enpkg-to-update-EPD-packages

    如果您的软件包无法通过 enpkg 获得(在您的情况下,rope 似乎是,而 pymacs 不是,假设您有适当的订阅),EPD 是一个非常标准的 python 发行版,您可以安装通过诸如pip 或通过获取源并运行python setup.py install 等正常方式将其打包。见:

    https://support.enthought.com/entries/22914233-Using-non-EPD-package-installers-such-as-pip

    【讨论】:

      【解决方案2】:

      再次为 Enthought Python 安装附加软件包会更简洁。尝试重用来自另一个安装的软件包对我来说既不干净也不安全。

      【讨论】:

        猜你喜欢
        • 2014-07-26
        • 1970-01-01
        • 2010-09-30
        • 2010-09-14
        • 2014-07-06
        • 1970-01-01
        • 2012-03-01
        • 2012-04-14
        • 2015-05-23
        相关资源
        最近更新 更多