您的位置:首页 > 娱乐 > 明星 > 贵州省住房和城乡建设厅官网_给您更优质的服务体验_钟南山今天感染新冠了_网站快速排名服务商

贵州省住房和城乡建设厅官网_给您更优质的服务体验_钟南山今天感染新冠了_网站快速排名服务商

2025/1/11 13:43:18 来源:https://blog.csdn.net/pjie131_/article/details/145067152  浏览:    关键词:贵州省住房和城乡建设厅官网_给您更优质的服务体验_钟南山今天感染新冠了_网站快速排名服务商
贵州省住房和城乡建设厅官网_给您更优质的服务体验_钟南山今天感染新冠了_网站快速排名服务商

安装dlib时失败,报错如下:

$pip install dlib
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://mirrors.huaweicloud.com/repository/pypi/simple
Collecting dlibDownloading https://mirrors.huaweicloud.com/repository/pypi/packages/3c/07/a2693a94ac678c442c4cfe269d24f63053b14410ef2d09957a762eeb4b8e/dlib-19.24.6.tar.gz (3.4 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 27.1 MB/s eta 0:00:00Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [44 lines of output]running egg_infocreating /tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-infowriting /tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-info/PKG-INFOwriting dependency_links to /tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-info/dependency_links.txtwriting top-level names to /tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-info/top_level.txtwriting manifest file '/tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-info/SOURCES.txt'reading manifest file '/tmp/pip-pip-egg-info-t2gd3sz_/dlib.egg-info/SOURCES.txt'reading manifest template 'MANIFEST.in'no previously-included directories found matching 'tools/python/build*'no previously-included directories found matching 'dlib/cmake_utils/*/build*'no previously-included directories found matching 'dlib/test'warning: no previously-included files matching '*.pyc' found anywhere in distributionTraceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "/tmp/pip-install-t2sl_h7x/dlib_b813669f1b0743f98721752d0092e03a/setup.py", line 243, in <module>setup(File "/home/pan/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 117, in setupreturn distutils.core.setup(**attrs)File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 183, in setupreturn run_commands(dist)File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 199, in run_commandsdist.run_commands()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 954, in run_commandsself.run_command(cmd)File "/home/pan/.local/lib/python3.8/site-packages/setuptools/dist.py", line 950, in run_commandsuper().run_command(command)File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_commandcmd_obj.run()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 311, in runself.find_sources()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 319, in find_sourcesmm.run()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 545, in runself.prune_file_list()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/command/sdist.py", line 161, in prune_file_listsuper().prune_file_list()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_listbase_dir = self.distribution.get_fullname()File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_core_metadata.py", line 267, in get_fullnamereturn _distribution_fullname(self.get_name(), self.get_version())File "/home/pan/.local/lib/python3.8/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullnamecanonicalize_version(version, strip_trailing_zero=False),TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed× Encountered error while generating package metadata.
╰─> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

查到是因为setuptools工具版本不对。

版本太高,需要重新安装一个。

$ pip list | grep setup
setuptools              75.1.0$ pip install 'setuptools<58.0.0'
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://mirrors.huaweicloud.com/repository/pypi/simple
Collecting setuptools<58.0.0Downloading https://mirrors.huaweicloud.com/repository/pypi/packages/4b/b9/71687c5d2034c863db1db2e0704f5e27581ff3cb44d7f293968c5e08ceb3/setuptools-57.5.0-py3-none-any.whl (819 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.3/819.3 kB 14.8 MB/s eta 0:00:00
Installing collected packages: setuptoolsAttempting uninstall: setuptoolsFound existing installation: setuptools 75.1.0Uninstalling setuptools-75.1.0:Successfully uninstalled setuptools-75.1.0
Successfully installed setuptools-57.5.0

再次安装dlib,成功

$ pip install dlib
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://mirrors.huaweicloud.com/repository/pypi/simple
Collecting dlibDownloading https://mirrors.huaweicloud.com/repository/pypi/packages/3c/07/a2693a94ac678c442c4cfe269d24f63053b14410ef2d09957a762eeb4b8e/dlib-19.24.6.tar.gz (3.4 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 26.5 MB/s eta 0:00:00Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlibBuilding wheel for dlib (setup.py) ... doneCreated wheel for dlib: filename=dlib-19.24.6-cp38-cp38-linux_x86_64.whl size=4126251 sha256=6c967d8d5c66dbe9e7f1d4fbec9e4a11e3ebac60b2f095d589eb7c240c2099e8Stored in directory: /home/pan/.cache/pip/wheels/9a/35/5e/88273b88fbc6923cf3cace8abdd556d50082dbdad89438cc6a
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.24.6

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com