开发者

Multiple Python Distributions -- Managing Packages

开发者 https://www.devze.com 2023-02-02 00:23 出处:网络
Ubuntu (10.10) came开发者_JS百科 installed with Python2.6, 2.7, and 3. In addition, I have installed the Enthought Python Distribution. Is there any way to manage Python packages within these distribu

Ubuntu (10.10) came开发者_JS百科 installed with Python2.6, 2.7, and 3. In addition, I have installed the Enthought Python Distribution. Is there any way to manage Python packages within these distributions intelligently?

For compatibility, I'd imagine switching between these distributions occasionally. If I install PyBlah, I'd like it to be available under all of the distributions. Can I do better than installing PyBlah under each distribution?


Well you can't install a package across 2.x-3.x distributions, they're not compatable. So the easiest ( and recommended way) is to install it for each version.

If you're sure you want to install it for all your versions, you can install it somewhere like ~/lib/python/ and add that directory to your PYTHONPATH.


Virtualenv and virtualenvwrapper make managing packages very nice!

0

精彩评论

暂无评论...
验证码 换一张
取 消