使用Arcface时需要安装bcolz,
【机翻】bcolz提供了可以在内存和磁盘上压缩的列式分块数据容器。列存储允许高效地查询表,以及廉价的列添加和删除。它基于NumPy,并将其用作与bcolz对象通信的标准数据容器,但它还支持向HDF5/PyTables和pandas数据帧导入/导出工具。
$ sudo pip3.7 install bcolz
WARNING: The directory '/home/user1/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Looking in indexes: https://mirrors.aliyun.com/pypi/simple/, https://pypi.tuna.tsinghua.edu.cn/simple Collecting bcolzDownloading https://mirrors.aliyun.com/pypi/packages/5c/4e/23942de9d5c0fb16f10335fa83e52b431bcb8c0d4a8419c9ac206268c279/bcolz-1.2.1.tar.gz (1.5 MB)|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.5 MB 1.6 MB/s ERROR: Command errored out with exit status 1:command: /usr/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fum2u3tg/bcolz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fum2u3tg/bcolz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ba13rly8cwd: /tmp/pip-install-fum2u3tg/bcolz/Complete output (45 lines):WARNING: The directory '/home/user1/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /pypi/simple/setuptools-scm/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /pypi/simple/setuptools-scm/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /pypi/simple/setuptools-scm/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /pypi/simple/setuptools-scm/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /pypi/simple/setuptools-scm/WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /simple/setuptools-scm/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /simple/setuptools-scm/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /simple/setuptools-scm/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /simple/setuptools-scm/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))': /simple/setuptools-scm/ERROR: Could not find a version that satisfies the requirement setuptools-scm>1.5.4 (from versions: none)ERROR: No matching distribution found for setuptools-scm>1.5.4SSE2 detectedAVX2 detectedTraceback (most recent call last):File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_eggsubprocess.check_call(cmd)File "/home/user1/miniconda3/lib/python3.7/subprocess.py", line 347, in check_callraise CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command '['/usr/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp8j1vrmxs', '--quiet', 'setuptools-scm>1.5.4']' returned non-zero exit status 1.During handling of the above exception, another exception occurred:Traceback (most recent call last):File "<string>", line 1, in <module>File "/tmp/pip-install-fum2u3tg/bcolz/setup.py", line 234, in <module>cmdclass=LazyCommandClass(),File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 160, in setup_install_setup_requires(attrs)File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 155, in _install_setup_requiresdist.fetch_build_eggs(dist.setup_requires)File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggsreplace_conflicting=True,File "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 783, in resolvereplace_conflicting=replace_conflictingFile "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1066, in best_matchreturn self.obtain(req, installer)File "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1078, in obtainreturn installer(requirement)File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_eggreturn fetch_build_egg(self, req)File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_eggraise DistutilsError(str(e))distutils.errors.DistutilsError: Command '['/usr/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp8j1vrmxs', '--quiet', 'setuptools-scm>1.5.4']' returned non-zero exit status 1.----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决:报错已经提示了,依次手动安装好它需要的依赖就可以
$ sudo pip3.7 install setuptools-scm
$ sudo pip3.7 install cython
$ sudo pip3.7 install bcolz
pip 已经20.1.1版本了,还是不够智能!
参考:https://bcolz.readthedocs.io/en/latest/intro.html#bcolz-at-glance
按照上面依次安装还是不行?
$ pip install bcolz
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/, https://pypi.tuna.tsinghua.edu.cn/simple
Collecting bcolzDownloading https://mirrors.aliyun.com/pypi/packages/5c/4e/23942de9d5c0fb16f10335fa83e52b431bcb8c0d4a8419c9ac206268c279/bcolz-1.2.1.tar.gz (1.5 MB)|████████████████████████████████| 1.5 MB 881 kB/sERROR: Command errored out with exit status 1:command: /home/user1/miniconda3/envs/py377/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sg70v86g/bcolz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sg70v86g/bcolz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-sg70v86g/bcolz/pip-egg-infocwd: /tmp/pip-install-sg70v86g/bcolz/Complete output (44 lines):WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /pypi/simple/numpy/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /pypi/simple/numpy/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /pypi/simple/numpy/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /pypi/simple/numpy/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /pypi/simple/numpy/WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /simple/numpy/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /simple/numpy/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /simple/numpy/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /simple/numpy/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))': /simple/numpy/ERROR: Could not find a version that satisfies the requirement numpy>=1.7 (from versions: none)ERROR: No matching distribution found for numpy>=1.7SSE2 detectedAVX2 detectedTraceback (most recent call last):File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_eggsubprocess.check_call(cmd)File "/home/user1/miniconda3/envs/py377/lib/python3.7/subprocess.py", line 363, in check_callraise CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command '['/home/user1/miniconda3/envs/py377/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpoeuqbsja', '--quiet', 'numpy>=1.7']' returned non-zero exit status 1.During handling of the above exception, another exception occurred:Traceback (most recent call last):File "<string>", line 1, in <module>File "/tmp/pip-install-sg70v86g/bcolz/setup.py", line 234, in <module>cmdclass=LazyCommandClass(),File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup_install_setup_requires(attrs)File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/__init__.py", line 138, in _install_setup_requiresdist.fetch_build_eggs(dist.setup_requires)File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggsreplace_conflicting=True,File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/pkg_resources/__init__.py", line 783, in resolvereplace_conflicting=replace_conflictingFile "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1066, in best_matchreturn self.obtain(req, installer)File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1078, in obtainreturn installer(requirement)File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_eggreturn fetch_build_egg(self, req)File "/home/user1/miniconda3/envs/py377/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_eggraise DistutilsError(str(e))distutils.errors.DistutilsError: Command '['/home/user1/miniconda3/envs/py377/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpoeuqbsja', '--quiet', 'numpy>=1.7']' returned non-zero exit status 1.----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
这次的报错还是很长很吓人,根据报错,把numpy装一下就好了。
$ pip install numpy