gpt4 book ai didi

python - 错误 : CMake must be installed to build dlib

转载 作者:行者123 更新时间:2023-12-02 16:10:37 26 4
gpt4 key购买 nike

在使用 docker build -t/flask-docker 创建图像以便稍后将其上传到 heroku 时,出现以下错误:

#8 417.3   ERROR: CMake must be installed to build dlib
#8 417.3
#8 417.3 ----------------------------------------
#8 417.3 ERROR: Failed building wheel for dlib
#8 417.3 Running setup.py clean for dlib
#8 417.8 Successfully built audioread collection face-recognition-models imutils resampy termcolor wrapt
#8 417.8 Failed to build dlib
#8 418.8 Installing collected packages: urllib3, pyasn1, idna, chardet, certifi, zipp, typing-extensions, six, rsa, requests, pyasn1-modules, oauthlib, cachetools, requests-oauthlib, pyparsing, pycparser, numpy, llvmlite, importlib-metadata, google-auth, dataclasses, Werkzeug, threadpoolctl, tensorboard-plugin-wit, tensorboard-data-server, scipy, protobuf, packaging, numba, MarkupSafe, Markdown, joblib, grpcio, google-auth-oauthlib, cffi, cached-property, appdirs, absl-py, wrapt, tqdm, termcolor, tensorflow-estimator, tensorboard, SoundFile, scikit-learn, resampy, regex, pytz, python-dateutil, pooch, Pillow, opt-einsum, Keras-Preprocessing, keras-nightly, Jinja2, itsdangerous, h5py, google-pasta, gast, flatbuffers, face-recognition-models, dlib, decorator, click, audioread, astunparse, wincertstore, waitress, tensorflow, pandas, opencv-python-headless, nltk, librosa, imutils, gunicorn, Flask, face-recognition, colorama, collection, cmake
#8 464.8 Running setup.py install for dlib: started
#8 466.5 Running setup.py install for dlib: finished with status 'error'
#8 466.5 ERROR: Command errored out with exit status 1:
#8 466.5 command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-93izef49/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/dlib
#8 466.5 cwd: /tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/
#8 466.5 Complete output (8 lines):
#8 466.5 running install
#8 466.5 running build
#8 466.5 running build_py
#8 466.5 package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
#8 466.5 running build_ext
#8 466.5
#8 466.5 ERROR: CMake must be installed to build dlib
#8 466.5
#8 466.5 ----------------------------------------
#8 466.5 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-93izef49/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/dlib Check the logs for full command output.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

这是我的 Dockerfile 设置:

FROM python:3.6.13

ENV APP_HOME /app
WORKDIR $APP_HOME

COPY . /app

RUN pip install -r requirements.txt

ENTRYPOINT ["python app.py"]

最佳答案

可能需要在 pip install 之前执行 RUN apt-get update && apt-get install -y cmake

关于python - 错误 : CMake must be installed to build dlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68132273/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com