首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >django-注册模块openshift上的最新版本

django-注册模块openshift上的最新版本
EN

Stack Overflow用户
提问于 2013-06-26 21:23:59
回答 4查看 217关注 0票数 0

我在openshift上托管django-1.5应用程序。我需要django-注册模块,我已经在requirements.txt文件中指定。

问题是openshift无法找到最新版本的django-注册-1.0,而只能找到django-注册-0.8,这与django-1.5不兼容。有什么办法解决这个问题吗?或者如何在requirements.txt中添加手动链接到最新版本?

我不明白为什么它在PyPI上找不到包。

代码语言:javascript
复制
remote: Searching for django-registration==1.0
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/django-registration/
remote: Reading http://www.bitbucket.org/ubernostrum/django-registration/wiki/
remote: Reading <some other link>
remote: Reading <some other link>
remote: Reading <Some Other link>
remote: No local packages or download links found for django-registration==1.0
remote: Best match: None
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2013-06-27 05:28:21

我使用setuptools指定依赖链接来使它工作,尽管我仍然不清楚为什么PyPI包不能工作。

代码语言:javascript
复制
from setuptools import setup, find_packages

setup(
    ...
    ...
    packages=find_packages(),
    include_package_data=True,
    install_requires=['django-registration==1.0'],
    dependency_links = [
        "http://pypi.python.org/pypi/django-registration"
    ],

)

票数 1
EN

Stack Overflow用户

发布于 2013-06-27 01:22:38

如何通过ssh登录到应用程序设备并运行来直接安装包:

代码语言:javascript
复制
source ~/python-2.6/virtenv/bin/activate
pip install --log $OPENSHIFT_DATA_DIR/inst.log https://URL_TO_CUSTOM_PACKAGE

代码语言:javascript
复制
source ~/python-2.6/virtenv/bin/activate
pip install --log $OPENSHIFT_DATA_DIR/inst.log -E $VIRTUAL_ENV  $path_to/package   
票数 0
EN

Stack Overflow用户

发布于 2015-03-26 01:22:24

因为这个问题仍然存在(啊!)我不能为django安装最新的安全版本,我必须找到解决这个问题的方法。在requirements.txt的顶部插入下面这行代码,神奇地解决了这个问题:

代码语言:javascript
复制
--index-url https://pypi.python.org/simple

它就是sets the base url for finding packages

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17321284

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档