问题
在CentOS中执行如下语句时报错误
pip install docker-compose
部分错误如下:
build/temp.linux-x86_64-3.6/_sodium.c:22:12: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
^~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_09li6zi/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hy1pdqgj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_09li6zi/pynacl/
解决
sudo yum install python36-devel
再次执行pip install docker-compose语句就好了!
Installing collected packages: pynacl, paramiko, docker, docker-compose
Running setup.py install for pynacl ... done
Successfully installed docker-5.0.3 docker-compose-1.29.2 paramiko-2.11.0 pynacl-1.5.0