Python是否有版本化的依赖性管理解决方案? [英] Does Python have a versioned dependency management solution?

查看:50
本文介绍了Python是否有版本化的依赖性管理解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python是否具有与apt或Maven类似的功能,其中单个存储库可以容纳不同版本的库,而不仅仅是当前版本?

Does Python have anything similar to apt or Maven where a single repository can house different versions of a library as opposed to just the current version?

例如:我的site-packages文件夹未按版本对库进行分组.因此,代替:

For example: My site-packages folder does not group libraries by version. So instead of:

/Library/Python/2.7/site-packages/tox/1_2_3

我们有:

/Library/Python/2.7/site-packages/tox

...可能包含最新版本的tox,它可能与我系统上要使用tox的每个软件兼容,也可能不兼容.是否有版本控制的方法?如果没有,是否可以创建一个?

...which presumably contains the latest version of tox which may or may not be compatible with every piece of software on my system that wants to use tox. Is there a versioned approach to this? If not, is it possible to create one?

推荐答案

否,无法在同一环境中安装软件包的多个版本,也无法在同一过程中导入多个版本.处理单独项目的特定版本的公认方法是为该项目设置 virtualenv 并安装特定要求.

No, there is no way to install multiple versions of a package in the same environment, nor import multiple versions in the same process. The commonly accepted way to handle specific versions for separate projects is to set up a virtualenv for that project and install the specific requirements.

这篇关于Python是否有版本化的依赖性管理解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆