dlib error in Django Project

xscherpschutterTRIAL

10 months ago

I am facing a problem in installing dlib while building my project, the log is as follows:

11 21.23 DEPRECATION: face-recognition-models is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

11 21.23 Running setup.py install for face-recognition-models: started

11 21.63 Running setup.py install for face-recognition-models: finished with status 'done'

11 21.64 DEPRECATION: dlib is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

11 21.64 Running setup.py install for dlib: started

11 21.85 Running setup.py install for dlib: finished with status 'error'

11 21.85 error: subprocess-exited-with-error

11 21.85

11 21.85 × Running setup.py install for dlib did not run successfully.

11 21.85 │ exit code: 1

11 21.85 ╰─> [11 lines of output]

11 21.85 running install

11 21.85 running build

11 21.85 running build_py

11 21.85 package init file 'tools/python/dlib/init.py' not found (or not a regular file)

11 21.85 warning: build_py: byte-compiling is disabled, skipping.

11 21.85

11 21.85 running build_ext

11 21.85 cmake: /lib/x8664-linux-gnu/libc.so.6: version GLIBC2.36' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)

11 21.85

11 21.85 ERROR: CMake must be installed to build dlib

11 21.85

11 21.85 [end of output]

I have no idea how to solve this problem, I already tried adding a nixpack.toml file in my project:

[phases.setup]
nixPkgs = [
"python38",
"python38Packages.pip",
"python38Packages.setuptools",
"python38Packages.wheel",
"cmake",
"gcc",
"gcc11",
"libffi",
"zlib",
"libjpeg",
"libpng",
"glibc"
]

View Deploy details

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

7 Replies

10 months ago


xscherpschutterTRIAL

10 months ago

Full build logs please - https://bookmarklets.up.railway.app/log-downloader/

Sorry, here's the log

Attachments


10 months ago

What version of python do you use you locally?


xscherpschutterTRIAL

10 months ago

i'm using Python 3.8.10


10 months ago

Then I think it would be best for you to write a Dockerfile for your app.


xscherpschutterTRIAL

10 months ago

Okay, I'll try to do it, any specifications I should add?


10 months ago

That's up to you and what your project needs to run.