使用 Anaconda 将 Django 应用程序部署到 Heroku 时,“没有这样的选项:--allow-all-external”

保罗中午

我使用 Django 1.11.20 和 Python 2.7。我的应用程序是使用 Heroku 部署的。

由于我需要 NumPy/SciPy 并且 Heroku 的 slug 大小限制为 500Mb,因此我通过以下三个 Heroku 构建包使用 Anaconda:

  • https://github.com/kennethreitz/conda-buildpack
  • https://github.com/cyberdelia/heroku-geo-buildpack.git
  • heroku/python

该网站在去年一直运行良好,几个月没有更新。

我最近对该站点进行了一些小的更改,但在将其部署到 Heroku 时出现以下错误。

我不明白到底是什么问题。

有什么线索吗?

        -----> Deleting 0 files matching .slugignore patterns.
        -----> Python/Conda app detected
        added pinned file in /app/.heroku/miniconda/conda-meta/pinned
        Collecting package metadata: ...working... done
        Solving environment: ...working... done
        ## Package Plan ##
          environment location: /app/.heroku/miniconda
          added / updated specs:
            - nomkl
        The following packages will be downloaded:
            package                    |            build
            ---------------------------|-----------------
            nomkl-3.0                  |                0          48 KB
            ------------------------------------------------------------
                                                   Total:          48 KB
        The following packages will be UPDATED:
          nomkl                                               1.0-0 --> 3.0-0
        Proceed ([y]/n)? 
        Downloading and Extracting Packages
        Preparing transaction: ...working... done
        Verifying transaction: ...working... done
        Executing transaction: ...working... done
        -----> Installing dependencies using Conda
               Collecting package metadata: ...working... done
               Solving environment: ...working... 
               The environment is inconsistent, please check the package plan             carefully
           The following packages are causing the inconsistency:

                 - defaults/linux-64::readline==7.0=h7b6447c_5
                 - defaults/linux-64::zlib==1.2.11=h7b6447c_3
                 - defaults/linux-64::python==2.7.15=h9bab390_6
                 - defaults/linux-64::scipy==0.17.1=np111py27_nomkl_0
                 - defaults/linux-64::pycparser==2.18=py27_0
                 - defaults/linux-64::ncurses==6.1=he6710b0_1
                 - defaults/linux-64::pysocks==1.6.7=py27he2db6d2_1
                 - defaults/linux-64::pycosat==0.6.3=py27ha4109ae_0
                 - defaults/linux-64::sqlite==3.26.0=h7b6447c_0
                 - defaults/linux-64::pycrypto==2.6.1=py27_0
                 - defaults/linux-64::openssl==1.1.1c=h7b6447c_1
                 - defaults/linux-64::libgcc-ng==8.2.0=hdf63c60_1
                 - defaults/linux-64::scikit-learn==0.17.1=np111py27_nomkl_1
                 - defaults/linux-64::six==1.10.0=py27_0
                 - defaults/linux-64::numpy==1.11.0=py27_nomkl_1
                 - defaults/linux-64::certifi==2019.3.9=py27_0
                 - defaults/linux-64::asn1crypto==0.22.0=py27_0
                 - defaults/linux-64::wheel==0.29.0=py27_0
                 - defaults/linux-64::urllib3==1.22=py27ha55213b_0
                 - defaults/linux-64::packaging==16.8=py27_0
                 - defaults/linux-64::cryptography==2.5=py27h1ba5d50_0
                 - defaults/linux-64::pyparsing==2.2.0=py27_0
                 - defaults/linux-64::ruamel_yaml==0.11.14=py27_1
                 - defaults/linux-64::libedit==3.1.20181209=hc058e9b_0
                 - defaults/linux-64::idna==2.6=py27_0
                 - defaults/linux-64::pyopenssl==17.0.0=py27_0
                 - defaults/linux-64::conda==4.6.14=py27_0
                 - defaults/linux-64::ipaddress==1.0.18=py27_0
                 - defaults/linux-64::cffi==1.10.0=py27_0
                 - defaults/linux-64::enum34==1.1.6=py27_0
                 - defaults/linux-64::requests==2.18.4=py27hc5b0589_1
                 - defaults/linux-64::tk==8.6.8=hbc83047_0
                 - defaults/linux-64::pyyaml==3.11=py27_1
                 - defaults/linux-64::pip==9.0.1=py27_1
                 - defaults/linux-64::chardet==3.0.4=py27hfa10054_1
                 - defaults/linux-64::futures==3.2.0=py27h7b459c0_0
                 - defaults/linux-64::setuptools==36.5.0=py27h68b189e_0
               done
            ==> WARNING: A newer version of conda exists. <==
          current version: 4.6.14
          latest version: 4.7.10
    Please update conda by running
        $ conda update -n base -c defaults conda

           ## Package Plan ##

             environment location: /app/.heroku/miniconda

             added / updated specs:
               - nomkl==1.0=0
               - numpy==1.11.0=py27_nomkl_1
               - scikit-learn==0.17.1=np111py27_nomkl_1
               - scipy==0.17.1=np111py27_nomkl_0


           The following packages will be downloaded:

               package                    |            build
           ---------------------------|-----------------
           _libgcc_mutex-0.1          |             main           3 KB
           certifi-2019.6.16          |           py27_0         154 KB
           libgcc-ng-9.1.0            |       hdf63c60_0         8.1 MB
           nomkl-1.0                  |                0          402 B
           pip-19.1.1                 |           py27_0         1.8 MB
           python-2.7.16              |       h9bab390_0        12.8 MB
           setuptools-41.0.1          |           py27_0         640 KB
           sqlite-3.29.0              |       h7b6447c_0         1.9 MB
           wheel-0.33.4               |           py27_0          39 KB
           ------------------------------------------------------------
                                                  Total:        25.4 MB

   The following NEW packages will be INSTALLED:

     _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main

   The following packages will be UPDATED:

     certifi                                   2019.3.9-py27_0 --> 2019.6.16-py27_0
     libgcc-ng                                8.2.0-hdf63c60_1 --> 9.1.0-hdf63c60_0
     pip                           pkgs/free::pip-9.0.1-py27_1 --> pkgs/main::pip-19.1.1-py27_0
     python                                  2.7.15-h9bab390_6 --> 2.7.16-h9bab390_0
     setuptools                          36.5.0-py27h68b189e_0 --> 41.0.1-py27_0
     sqlite                                  3.26.0-h7b6447c_0 --> 3.29.0-h7b6447c_0
     wheel                      pkgs/free::wheel-0.29.0-py27_0 --> pkgs/main::wheel-0.33.4-py27_0

   The following packages will be DOWNGRADED:

     nomkl                                               3.0-0 --> 1.0-0



   Downloading and Extracting Packages

   Preparing transaction: ...working... done
   Verifying transaction: ...working... done
   Executing transaction: ...working... done
-----> Installing dependencies using Pip
Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...
no such option: --allow-all-external
 !     Push rejected, failed to compile Python/Conda app.
 !     Push failed
克里斯

您使用的pip是最新版本 19.1.1。

我不知道您之前使用的是哪个版本,但该--allow-all-external选项pip8.0 版(2016 年 1 月发布)中已弃用,pip10.0(2018 年初发布)中删除

要么更新您的应用程序,使其不需要--allow-all-external(更好的选择),或者,如果您绝对必须,使用pip8.0.0 之前的版本。考虑到 8.0 发布多久了,强烈建议不要使用最后一个选项。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用Docker将Django应用程序部署到heroku时在哪里运行collectstatic?

将 Django 应用程序部署到 Heroku 时出错

应用程序与 buildpack 不兼容:将 django 应用程序部署到 heroku 时出错

无法使用 heroku local 将 Django 应用程序部署到 heroku

使用git push将Django应用程序部署到heroku时出现无法识别的错误

无法使用 django-allauth 将 django 应用程序部署到 heroku

使用 Pyaudio 库将 Django 应用程序部署到 Heroku

将 Django 应用程序部署到 heroku 时出现 `collectstatic` 错误

尝试将Django应用程序部署到Heroku时出现“无法连接('0.0.0.0',5000)”

将 Django-React 应用程序部署到 Heroku 时出错

将Django应用程序部署到Heroku时出错-TypeError:类型'PosixPath'的参数不可迭代

使用React将RoR应用程序部署到heroku时未显示Bootstrap样式

使用 Tomcat 和 Mysql 将应用程序部署到 Heroku 时出错

使用Action Cable时将Ruby on Rails应用程序部署到Heroku(侦听Puma端口)

将 Django 应用程序部署到 Heroku - 没有名为 'django_project.wsgi 的模块

使用ActionCable将Rails应用程序部署到Heroku

将Angular应用程序部署到Heroku时出错

H14 将 Django 应用程序部署到 Heroku 时出现关于网站图标的错误

Heroku在使用子域时没有这样的应用程序

缺少脚本:将应用程序部署到Heroku时,启动和应用程序崩溃

使用dotnet-buildpack将ASP.NET 5应用程序部署到Heroku时出错

使用Swift 4.1将Vapor 3 Beta应用程序部署到Heroku时出现问题

无法将Django应用程序部署到Heroku“未检测到Cedar支持的应用程序”

将Django应用程序部署到heroku-找不到文件

将Django项目部署到Heroku:应用程序错误

ArgumentError:无效选项:将Rails 5应用程序部署到Heroku时和谐

将“初学者的 Django”应用程序部署到 Heroku 失败并出现 ModuleNotFoundError:没有名为“_tkinter”的模块

使用 git 使用自定义名称将应用程序部署到 Heroku?

将Rails应用程序部署到Heroku之后,没有下拉列表