• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

管理Jython软件包的最佳方法

用户头像
it1352
帮助1

问题说明

我正在PyDev中构建一个Jython程序,并且在此过程中发现需要一些对于Jython 2.5不是标准但对于CPython 2.7是标准的软件包.至此,我一直在使用python的easy_install,并错误地将PyDev指向/usr/lib/python2.7/dist-packages.虽然不正确,但在过去几个月一直有效,直到今天我遇到此问题;优先考虑Jython库并导致havok的Python 2.7库之一.

I'm building a Jython program in PyDev and in the process have found need for some packages that are not standard for Jython 2.5 but that are standard for CPython 2.7. To this point, I've been using python's easy_install and incorrectly pointing PyDev to /usr/lib/python2.7/dist-packages. While incorrect, this has worked for the past few months until today when I encountered this problem; one of the Python 2.7 libs taking prescient over a Jython lib and causing havok.

我的问题有两个:

为Jython打包库的正确方法是什么.它像virtual-env easy_install一样简单吗?如果是这样,如何为Jython设置virtual-env?

What is the proper way to package libraries for Jython. Is it as simple as virtual-env easy_install? If so how does one setup virtual-env for Jython?

假设Python 2.7库可以在2.5上运行,那么将Python 2.7库回移植到Jython安装中的正确方法是什么. (使用pkg_resources模块的奖励点和示例.)

What is the proper way to backport Python 2.7 libs into a Jython install, assuming they can function on 2.5. (Bonus points for and example using the pkg_resources modules.)

正确答案

#1

好的,所以这一点比我本来想要的更加明显.

Ok, so this one is way more obvious than I would have liked.

此问题的答案说明了安装Jython的easy_install,引用了所有内容,即Jython文档的附录...

The answer to this question explains the installation of easy_install for Jython, citing of all things, the Appendix of the Jython Docs...

使用/path/to/jython/bin/easy_install,然后将其他模块安装到它们应驻留的Jython/Lib/site-packages/目录中.

using /path/to/jython/bin/easy_install then installs additional modules to your Jython/Lib/site-packages/ directory where they should reside.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcgabgj
系列文章
更多 icon
同类精品
更多 icon
继续加载