I’m trying to deploy the app using streamlit sharing and the error logged on the main screen is:
ModuleNotFoundError: No module named 'dlib'
The error logged in the terminal is as follows:
Building wheels for collected packages: dlib, netifaces
Building wheel for dlib (setup.py): started
Building wheel for dlib (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7dy9sm5e
cwd: /tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/
Complete output (53 lines):
running bdist_wheel
running build
running build_py
package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "/usr/local/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py", line 262, in <module>
'Topic :: Software Development',
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "/tmp/pip-install-kzxfscb_/dlib_2d582b7043ea4ef1b1e78f4f3909c733/setup.py", line 125, in get_cmake_version
"\n*******************************************************************\n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
It looks like the error is due to the fact that cmake is not installed but I’ve included cmake in packages.txt and somehow it doesn’t recognize cmake as well as the other packages at all. Corresponding log is given below:
E: Unable to locate package freeglut3-dev
E: Unable to locate package libgtk2.0-dev
E: Couldn't find any package by glob 'libgtk2.0-dev
E: Couldn't find any package by regex 'libgtk2.0-dev
E: Unable to locate package cmake
Link to the hosted app on streamlit
I need to deploy it urgently. So any help is really appreciated.