Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Heroku设置pip失败_Python_Django_Heroku - Fatal编程技术网

Python Heroku设置pip失败

Python Heroku设置pip失败,python,django,heroku,Python,Django,Heroku,我正在尝试将django应用程序部署到Heroku,它依赖于django管理工具,正如您在requirements.txt中看到的那样 当我运行push命令时,Heroku无法安装该包,但我在pypi中看到了它 有什么帮助吗 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-dat

我正在尝试将django应用程序部署到Heroku,它依赖于django管理工具,正如您在requirements.txt中看到的那样

当我运行push命令时,Heroku无法安装该包,但我在pypi中看到了它

有什么帮助吗

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
推送

    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

如果我在我的机器上运行pip install django admin tools==0.5.1,它可以工作,但当我尝试推送到Heroku时,它会不断向我显示错误,可能您在本地计算机上使用的是旧版本的pip,而Heroku使用的是新版本的pip

django admin tools==0.5.1托管在bitbucket上。而pip不再允许安装默认情况下不在PyPI本身上托管的软件包。所以安装失败了

将以下内容添加到requirements.txt将解决此问题

--allow-unverified django-admin-tools
django-admin-tools==0.5.1
参考资料:


您的计算机中的pip版本是什么?自从pypa/pip#1423以来,不再允许安装默认情况下不在PyPI上托管的软件包。我尝试了这一点(但使用了PIL),但仍然收到错误:忽略了一些不安全和无法验证的文件(使用--allow unverified PIL to allow)。清理。。。对于在/app/.pip/pip.log中存储故障调试日志的PIL==1.1.7(来自-r requirements.txt(第2行)),根本找不到任何发行版!Push被拒绝,未能编译Python应用程序我还能做什么?经过半个小时的疯狂搜索,我终于找到了你的答案-希望我能给你不止一票!(y)