简体   繁体   English

如何在Linux Debian上更新Python PygreSQL软件包?

[英]How to update Python PygreSQL package on Linux Debian?

I have Linux Debian installed. 我已经安装了Linux Debian。 In debian repository the newest stable version of PygreSQL is 4.0 在debian存储库中,PygreSQL的最新稳定版本是4.0

The newest version of PygreSQL is 5.0.2 but I don't see debian in thier site: http://www.pygresql.org/download/index.html PygreSQL的最新版本是5.0.2,但我在其站点中看不到debian: http ://www.pygresql.org/download/index.html

What should I do? 我该怎么办?

  1. Download the source code of the package 下载包的源代码
  2. Install it locally within your python installation with virtualenv: pip install --no-index --find-links file:your path here name of module 使用virtualenv在python安装中本地安装:pip install --no-index --find-links文件:此处的路径模块名称

system wide: sudo pip install --no-index --find-links file:your path here name of module 系统范围:sudo pip install --no-index --find-links文件:您的路径此处模块名称

Maybe you have to add dependent modules too. 也许您也必须添加相关模块。

Hope that helps. 希望能有所帮助。

JJ J

First you'll have to uninstall the version of pygresql you have right now. 首先,您必须卸载当前拥有的pygresql版本。 Then follow one of the methods below. 然后按照下列方法之一。

To install Pygresql system wide, you'll need to follow the Compiling Manually steps. 要在整个系统上安装Pygresql,您需要按照“ 手动编译”步骤进行操作。 You can also make a package by following How to Package For Debian . 您也可以按照“ 如何为Debian打包”进行打包 This is probably the best way which gives your dev ops and/or sys admins the most control. 这可能是使您的开发人员和/或系统管理员拥有最大控制权的最佳方法。

Another way would be to install development packages like python-dev, libpython-dev, libpq-dev (I may be missing some, but hopefully you get the big picture), then running a pip install pygresql . 另一种方法是安装开发包,例如python-dev, libpython-dev, libpq-dev (我可能会遗漏一些,但希望您能pip install pygresql了解),然后运行pip install pygresql I'd try this out in a virtualenv before installing it system wide. 在将其安装到整个系统之前,我会先在virtualenv中进行尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM