Failed to build dlib

mehsansTRIAL

4 months ago

Hi, I am trying to host my flask app on railway server, I am constantly getting these error
Building wheels for collected packages: dlib, face-recognition-models

Building wheel for dlib (pyproject.toml): started

Building wheel for dlib (pyproject.toml): finished with status 'error'

error: subprocess-exited-with-error

× Building wheel for dlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [44 lines of output]
:234: SyntaxWarning: invalid escape sequence '('
:235: SyntaxWarning: invalid escape sequence '('
:236: SyntaxWarning: invalid escape sequence '('
running bdistwheel running build running buildext

  ================================================================================
  ================================================================================
  ================================================================================

                     CMake is not installed on your system!

      Or it is possible some broken copy of cmake is installed on your system.
      It is unfortunately very common for python package managers to include
      broken copies of cmake.  So if the error above this refers to some file
      path to a cmake file inside a python or anaconda or miniconda path then you
      should delete that broken copy of cmake from your computer.

      Instead, please get an official copy of cmake from one of these known good
      sources of an official cmake:
          - [cmake.org](cmake.org) (this is how windows users should get cmake)
          - apt install cmake (for Ubuntu or Debian based systems)
          - yum install cmake (for Redhat or CenOS based systems)

      On a linux machine you can run which cmake to see what cmake you are
      actually using.  If it tells you it's some cmake from any kind of python
      packager delete it and install an official cmake.

      More generally, cmake is not installed if when you open a terminal window
      and type
         cmake --version
      you get an error.  So you can use that as a very basic test to see if you
      have cmake installed.  That is, if cmake --version doesn't run from the
      same terminal window from which you are reading this error message, then
      you have not installed cmake.  Windows users should take note that they
      need to tell the cmake installer to add cmake to their PATH.  Since you
      can't run commands that are not in your PATH.  This is how the PATH works
      on Linux as well, but failing to add cmake to the PATH is a particularly
      common problem on windows and rarely a problem on Linux.

  ================================================================================
  ================================================================================
  ================================================================================
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for dlib

Building wheel for face-recognition-models (pyproject.toml): started

Building wheel for face-recognition-models (pyproject.toml): finished with status 'done'

Created wheel for face-recognition-models: filename=facerecognitionmodels-0.3.0-py2.py3-none-any.whl size=100566211 sha256=f40248a3c550026663c7a7e656b820bed5ecebf73468de207acc43005d8eafb7

Stored in directory: /tmp/pip-ephem-wheel-cache-_p12i177/wheels/8f/47/c8/f44c5aebb7507f7c8a2c0bd23151d732d0f0bd6884ad4ac635

Successfully built face-recognition-models

Failed to build dlib

The project works fine in my local machine however on the server i can't simply deploy it. I have tried pre built command to install cmake and dlib but nothing worked, Can you help ?

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

0 Replies