我有什么版本的 Pyramid,更新的最佳方式是什么? [英] What version of Pyramid do I have and what's the best way to update?

查看:26
本文介绍了我有什么版本的 Pyramid,更新的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Pyramid,我想知道如何检查我当前使用的版本.另外,如何更新我的 Pyramid?

解决方案

要知道您拥有的是哪个版本的金字塔,您可以在 python 控制台中运行:

<预><代码>>>>导入 pkg_resources>>>pkg_resources.get_distribution("金字塔").version

要更新,您可以运行 pip install --upgrade pyramid,但是为了更新金字塔及其所有依赖项,我建议您替换当前的 virtualenv 并用新的替换它,全新安装的金字塔.安装过程如果您不确定如何操作,文档中的 应该可以帮助您.

I'm using Pyramid and I'm wondering how I can check what version I'm currently using. Also, how can I update my Pyramid?

解决方案

To know which version of pyramid you have, you can run this in a python console :

>>> import pkg_resources
>>> pkg_resources.get_distribution("pyramid").version

To update, you could run pip install --upgrade pyramid, but in order to update pyramid and all its dependencies, I advice you to replace your current virtualenv and replace it with a new one, with a fresh install of pyramid. The installation procedure in the documentation should help you if you are not sure about how to do that.

这篇关于我有什么版本的 Pyramid,更新的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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