如何使用requirements.txt在Heroku python web应用程序中安装Dlib?

如何使用requirements.txt在Heroku python web应用程序中安装Dlib?,python,opencv,heroku,boost,dlib,Python,Opencv,Heroku,Boost,Dlib,我构建了一个涉及机器学习的Python Flask web API,在Heroku上部署它时遇到了很多挫折 问题是,我的应用程序依赖于Dlib(一个库),我似乎找不到在Heroku服务器上安装的方法。我正在努力解决这个问题,我可以想象其他AI开发者可能会遇到这个问题。请帮帮我 以下是我迄今为止所做的工作。 通过在my requirements.txt中指定dlib==19.4.0及其依赖项,我尝试不使用Buildpack,但由于依赖于Boost,因此失败了 我研究了Dlib()的依赖关系 而且

我构建了一个涉及机器学习的Python Flask web API,在Heroku上部署它时遇到了很多挫折

问题是,我的应用程序依赖于Dlib(一个库),我似乎找不到在Heroku服务器上安装的方法。我正在努力解决这个问题,我可以想象其他AI开发者可能会遇到这个问题。请帮帮我

以下是我迄今为止所做的工作。

通过在my requirements.txt中指定dlib==19.4.0及其依赖项,我尝试不使用Buildpack,但由于依赖于Boost,因此失败了

我研究了Dlib()的依赖关系

而且

因此,我在requirements.txt文件中包含了boost==0.1、cmake==0.7.1和boostpy==1.00。 安装失败,这是生成日志

-----> Python app detected
 !     The latest version of Python 3 is python-3.6.2 (you are using python-3.6.1, which is unsupported).
 !     We recommend upgrading by specifying the latest version (python-3.6.2).
       Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.6.1
-----> Installing pip
-----> Installing requirements with pip
       Collecting gunicorn (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 1))
         Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111kB)
       Collecting boost==0.1 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading boost-0.1.tar.gz
       Collecting boost-py==1.0.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 3))
         Downloading boost_py-1.0.0-py3-none-any.whl
       Collecting click==6.7 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 4))
         Downloading click-6.7-py2.py3-none-any.whl (71kB)
       Collecting cmake==0.7.1 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 5))
         Downloading cmake-0.7.1-cp36-cp36m-manylinux1_x86_64.whl (19.1MB)
       Collecting colorthief==0.2.1 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 6))
         Downloading colorthief-0.2.1-py2.py3-none-any.whl
       Collecting cycler==0.10.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 7))
         Downloading cycler-0.10.0-py2.py3-none-any.whl
       Collecting Flask==0.12.2 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 8))
         Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
       Collecting Flask-Gunicorn==0.1.1 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 9))
         Downloading Flask_Gunicorn-0.1.1-py3-none-any.whl
       Collecting imutils==0.4.3 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 10))
         Downloading imutils-0.4.3.tar.gz
       Collecting itsdangerous==0.24 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 11))
         Downloading itsdangerous-0.24.tar.gz (46kB)
       Collecting Jinja2==2.9.6 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 12))
         Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
       Collecting jsonify==0.5 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 13))
         Downloading jsonify-0.5.tar.gz
       Collecting MarkupSafe==1.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 14))
         Downloading MarkupSafe-1.0.tar.gz
       Collecting matplotlib==2.0.2 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 15))
         Downloading matplotlib-2.0.2-cp36-cp36m-manylinux1_x86_64.whl (14.6MB)
       Collecting numpy==1.13.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 16))
         Downloading numpy-1.13.0-cp36-cp36m-manylinux1_x86_64.whl (17.0MB)
       Collecting olefile==0.44 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 17))
         Downloading olefile-0.44.zip (74kB)
       Collecting opencv-python==3.2.0.7 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 18))
         Downloading opencv_python-3.2.0.7-cp36-cp36m-manylinux1_x86_64.whl (6.7MB)
       Collecting Pillow==4.1.1 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 19))
         Downloading Pillow-4.1.1-cp36-cp36m-manylinux1_x86_64.whl (5.7MB)
       Collecting pymongo==3.4.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 20))
         Downloading pymongo-3.4.0.tar.gz (583kB)
       Collecting pyparsing==2.2.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 21))
         Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
       Collecting python-dateutil==2.6.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 22))
         Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
       Collecting pytz==2017.2 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 23))
         Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
       Collecting six==1.10.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 24))
         Downloading six-1.10.0-py2.py3-none-any.whl
       Collecting Werkzeug==0.12.2 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 25))
         Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
       Collecting dlib==19.7.0 (from -r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 26))
         Downloading dlib-19.7.0.tar.gz (4.0MB)
       Collecting Mastodon.py (from boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading Mastodon.py-1.1.1-py2.py3-none-any.whl
       Collecting sqlalchemy (from boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading SQLAlchemy-1.1.14.tar.gz (5.2MB)
       Collecting peppercorn (from boost-py==1.0.0->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 3))
         Downloading peppercorn-0.5.tar.gz
       Collecting requests (from Mastodon.py->boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
       Collecting urllib3<1.23,>=1.21.1 (from requests->Mastodon.py->boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
       Collecting idna<2.7,>=2.5 (from requests->Mastodon.py->boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading idna-2.6-py2.py3-none-any.whl (56kB)
       Collecting certifi>=2017.4.17 (from requests->Mastodon.py->boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
       Collecting chardet<3.1.0,>=3.0.2 (from requests->Mastodon.py->boost==0.1->-r /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/requirements.txt (line 2))
         Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
       Installing collected packages: gunicorn, urllib3, idna, certifi, chardet, requests, six, python-dateutil, pytz, Mastodon.py, sqlalchemy, boost, peppercorn, boost-py, click, cmake, olefile, Pillow, colorthief, cycler, itsdangerous, MarkupSafe, Jinja2, Werkzeug, Flask, Flask-Gunicorn, imutils, jsonify, pyparsing, numpy, matplotlib, opencv-python, pymongo, dlib
         Running setup.py install for sqlalchemy: started
           Running setup.py install for sqlalchemy: finished with status 'done'
         Running setup.py install for boost: started
           Running setup.py install for boost: finished with status 'done'
         Running setup.py install for peppercorn: started
           Running setup.py install for peppercorn: finished with status 'done'
         Running setup.py install for olefile: started
           Running setup.py install for olefile: finished with status 'done'
         Running setup.py install for itsdangerous: started
           Running setup.py install for itsdangerous: finished with status 'done'
         Running setup.py install for MarkupSafe: started
           Running setup.py install for MarkupSafe: finished with status 'done'
         Running setup.py install for imutils: started
           Running setup.py install for imutils: finished with status 'done'
         Running setup.py install for jsonify: started
           Running setup.py install for jsonify: finished with status 'done'
         Running setup.py install for pymongo: started
           Running setup.py install for pymongo: finished with status 'done'
         Running setup.py install for dlib: started
           Running setup.py install for dlib: finished with status 'error'
           Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yongtg64/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-377kpsyp-record/install-record.txt --single-version-externally-managed --compile:
           running install
           running build
           Detected Python architecture: 64bit
           Detected platform: linux
           Configuring cmake ...
           -- The C compiler identification is GNU 5.4.0
           -- The CXX compiler identification is GNU 5.4.0
           -- Check for working C compiler: /usr/bin/cc
           -- Check for working C compiler: /usr/bin/cc -- works
           -- Detecting C compiler ABI info
           -- Detecting C compiler ABI info - done
           -- Detecting C compile features
           -- Detecting C compile features - done
           -- Check for working CXX compiler: /usr/bin/c++
           -- Check for working CXX compiler: /usr/bin/c++ -- works
           -- Detecting CXX compiler ABI info
           -- Detecting CXX compiler ABI info - done
           -- Detecting CXX compile features
           -- Detecting CXX compile features - done
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
             Imported targets not available for Boost version
           Call Stack (most recent call first):
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDENCIES)
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENCIES)
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:61 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
             No header defined for python-py34; skipping header check
           Call Stack (most recent call first):
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:61 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           -- Could NOT find Boost
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
             Imported targets not available for Boost version
           Call Stack (most recent call first):
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDENCIES)
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENCIES)
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:63 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
             No header defined for python-py35; skipping header check
           Call Stack (most recent call first):
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:63 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           -- Could NOT find Boost
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
             Imported targets not available for Boost version
           Call Stack (most recent call first):
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDENCIES)
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENCIES)
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:66 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
             No header defined for python3; skipping header check
           Call Stack (most recent call first):
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:66 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           -- Could NOT find Boost
           CMake Warning at /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
             Imported targets not available for Boost version
           Call Stack (most recent call first):
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDENCIES)
             /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/python3.6/site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENCIES)
             /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:69 (FIND_PACKAGE)
             CMakeLists.txt:9 (include)
           -- Could NOT find Boost
           -- Found PythonLibs: /tmp/build_910a6f43d62d0d69b0d944c5ae4b3c87/Nuelsian-deployment-0ffa4db157435edabc6f7cb904da61e2379ac163/.heroku/python/lib/libpython3.6m.a (found suitable version "3.6.1", minimum required is "3.4")
           --  *****************************************************************************************************
           --  To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder
           --  and run these commands:
           --     ./bootstrap.sh --with-libraries=python
           --     ./b2
           --     sudo ./b2 install
           --  *****************************************************************************************************
           CMake Error at /tmp/pip-build-yongtg64/dlib/dlib/cmake_utils/add_python_module:116 (message):
              Boost python library not found.
           Call Stack (most recent call first):
             CMakeLists.txt:9 (include)
           -- Configuring incomplete, errors occurred!
           See also "/tmp/pip-build-yongtg64/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
           error: cmake configuration failed!

           ----------------------------------------
       Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yongtg64/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-377kpsyp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yongtg64/dlib/
 !     Push rejected, failed to compile Python app.
 !     Push failed
当我打开应用程序时,我会得到应用程序错误和日志

2017-10-07T12:33:47.122379+00:00 heroku[web.1]: Starting process with command `gunicorn app:app --log-file -`
2017-10-07T12:33:49.627779+00:00 app[web.1]: bash: gunicorn: command not found
2017-10-07T12:33:49.700534+00:00 heroku[web.1]: Process exited with status 127
2017-10-07T12:33:49.713288+00:00 heroku[web.1]: State changed from starting to crashed
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
我观察到,如果我在部署应用程序时没有包含这些构建包,那么gunicorn不会出现任何错误,但我的应用程序需要dlib

我的requirements.txt文件:

-----> Python3 + OpenCV + DLib app detected
-----> Generating environment
       Fetching...
       Unpacking...
tar: This does not look like a tar archive
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
-----> Found requirements.txt, installing dependencies using pip
/app/tmp/buildpacks/6c499595b704aea0287ed02dc4cb12382496a45391b9e41bdf4fe9d946bbf725b480741dac04e7f02dbb412489937b86a1837abdc27865b9b20adfce0b360eef/bin/compile: line 78: /app/.heroku/vendor/bin/pip3: No such file or directory
-----> Creating environment variables.
-----> Buildpack installed.
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 185.4M
-----> Launching...
       Released v3
       https://magicmirrordotai.herokuapp.com/ deployed to Heroku
gunicorn
click==6.7
cmake==0.7.1
colorthief==0.2.1
cycler==0.10.0
Flask==0.12.2
Flask-Gunicorn==0.1.1
imutils==0.4.3
itsdangerous==0.24
Jinja2==2.9.6
jsonify==0.5
MarkupSafe==1.0
matplotlib==2.0.2
numpy==1.13.0
olefile==0.44
opencv-python==3.2.0.7
Pillow==4.1.1
pymongo==3.4.0
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
six==1.10.0
Werkzeug==0.12.2
Myruntime.txt

python-3.6.1
我的Procfile

web: gunicorn app:app --log-file -

随着Dlib的最新更新,将Dlib添加到构建包应该不再是问题,因为Boost依赖项已被删除

您需要cmake来安装Dlib。要在heroku中安装cmake,您需要构建包cmake并设置该构建以安装dlib

您可以将此构建包用于cmake

在CLI中执行此操作

  • 登录到heroku
  • 复制粘贴heroku创建--buildpackhttps://github.com/VovchikMonkey/heroku-buildpack-cmake.git
  • 最后设置buildpack
    heroku buildpacks:sethttps://github.com/Starkast/heroku-buildpack-cmake
  • 然后部署
    $git add。
    $git commit-am“让它变得更好”
    $git推送heroku
    master

  • 谁能帮帮我吗@大卫·金你解决了这个问题吗?我也想知道!我搬到了蟒蛇俱乐部。和我在电脑上一样,安装我所有的应用程序依赖项非常简单直观。起初,我对使用python anywhere犹豫不决,因为设置我的应用程序超出了我的免费512mb存储空间,但看到我别无选择,尤其是在经历了与Heroku的磨难之后,我决定付费,所以我现在是python anywhere的付费用户。我现在订阅了他们每月5美元的计划。下次当你看到一个问题时,你也希望有一个答案来投票!这使它能够获得更多的意见,并使它更有可能得到答复。到目前为止(2017年10月25日),这个问题只有58个观点,这是在我发布了几个星期之后,我为它贡献了40多个观点。我忍不住听起来很生气,真的。我花了大约两个月的时间尝试部署一个花了大约4个月时间构建的应用程序,将Dlib添加到构建包应该不再是一个问题,因为Boost依赖项已被删除,所以我尝试使用链接:安装Dlib appbuild pack,但出现以下错误:这看起来不像tar归档远程:xz:(stdin):文件格式无法识别远程:tar:Child返回状态1远程:tar:错误不可恢复:立即退出
    python-3.6.1
    
    web: gunicorn app:app --log-file -