使用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 bcolz
Downloading 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-ba13rly8
cwd: /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.4
SSE2 detected
AVX2 detected
Traceback (most recent call last):
File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/home/user1/miniconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise 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 "" , 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_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/home/user1/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/home/user1/miniconda3/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise 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