我在openshift上托管django-1.5应用程序。我需要django-注册模块,我已经在requirements.txt文件中指定。
问题是openshift无法找到最新版本的django-注册-1.0,而只能找到django-注册-0.8,这与django-1.5不兼容。有什么办法解决这个问题吗?或者如何在requirements.txt中添加手动链接到最新版本?
我不明白为什么它在PyPI上找不到包。
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发布于 2013-06-27 05:28:21
我使用setuptools指定依赖链接来使它工作,尽管我仍然不清楚为什么PyPI包不能工作。
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"
],)
发布于 2013-06-27 01:22:38
如何通过ssh登录到应用程序设备并运行来直接安装包:
source ~/python-2.6/virtenv/bin/activate
pip install --log $OPENSHIFT_DATA_DIR/inst.log https://URL_TO_CUSTOM_PACKAGE或
source ~/python-2.6/virtenv/bin/activate
pip install --log $OPENSHIFT_DATA_DIR/inst.log -E $VIRTUAL_ENV $path_to/package 发布于 2015-03-26 01:22:24
因为这个问题仍然存在(啊!)我不能为django安装最新的安全版本,我必须找到解决这个问题的方法。在requirements.txt的顶部插入下面这行代码,神奇地解决了这个问题:
--index-url https://pypi.python.org/simplehttps://stackoverflow.com/questions/17321284
复制相似问题