简体   繁体   English

Heroku设置点失败

[英]Heroku setup pip fail

I am trying to deploy a django application to Heroku, it dependes to django-admin-tools as you can see above in requirements.txt 我正在尝试将django应用程序部署到Heroku,它依赖于django-admin-tools,如上面的requirements.txt中所示。

When i run push command Heroku can't install the package, but I see it in pypi 当我运行push命令Heroku无法安装包,但我在pypi中看到它

https://pypi.python.org/pypi/django-admin-tools https://pypi.python.org/pypi/django-admin-tools

Any help? 有帮助吗?

requirements.txt requirements.txt

MySQL-python==1.2.3
Django==1.6.2
simple-db-migrate==2.0.0
django-debug-toolbar==1.0.1
django-admin-tools==0.5.1
dj-database-url==0.2.2
dj-static==0.0.5
static==0.4

push

    git push heroku master







  Fetching repository, done.
    Counting objects: 8, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (6/6), done.
    Writing objects: 100% (6/6), 623 bytes, done.
    Total 6 (delta 4), reused 0 (delta 0)

    -----> Python app detected
    -----> No runtime.txt provided; assuming python-2.7.6.
    -----> Using Python runtime (python-2.7.6)
    -----> Installing dependencies using Pip (1.5.4)
           Downloading/unpacking django-admin-tools==0.5.1 (from -r requirements.txt (line 7))
             http://bitbucket.org/izi/django-admin-tools/0.5.1 uses an insecure transport scheme (http). Consider using https if bitbucket.org has it available
             http://bitbucket.org/izi/django-admin-tools/ uses an insecure transport scheme (http). Consider using https if bitbucket.org has it available
         Could not find any downloads that satisfy the requirement django-admin-tools==0.5.1 (from -r requirements.txt (line 7))
       Cleaning up...
       No distributions at all found for django-admin-tools==0.5.1 (from -r requirements.txt (line 7))
       Storing debug log for failure in /app/.pip/pip.log

 !     Push rejected, failed to compile Python app

if I run pip install django-admin-tools==0.5.1 in my machine it works, but it keep showing me error when I try to push to Heroku 如果我在我的机器上运行pip install django-admin-tools == 0.5.1它可以工作,但是当我尝试推送到Heroku时它会一直显示错误

Probably you are using a older version of pip in your local computer while Heroku is using newer version of pip. 可能你在本地计算机上使用旧版本的pip,而Heroku正在使用更新版本的pip。

django-admin-tools==0.5.1 is hosted on the bitbucket. django-admin-tools == 0.5.1托管在bitbucket上。 While pip is no longer allowed to install packages that are not hosted on PyPI itself by default. 虽然默认情况下不再允许pip安装不在PyPI上托管的软件包。 So the installation failed. 所以安装失败了。

Adding the following stuff to you requirements.txt would solve the problem. 将以下内容添加到requirements.txt可以解决问题。

--allow-unverified django-admin-tools
django-admin-tools==0.5.1

References: 参考文献:

Forced use of --allow-external and --allow-unverified very inconvenient and not very intuitive #1423 强制使用--allow-external和--allow-unverified非常不方便且不太直观#1423

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

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