我想在没有编译器的环境中安装ruamel.yaml,并且我不关心性能。
尝试不创建扩展名而无法执行未安装的C编译器而没有点子安装ruamel.yaml的正确方法是什么?
我跑了
pip3 install ruamel.yaml
失败与
building '_ruamel_yaml' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/ext
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.6m -c ext/_ruamel_yaml.c -o build/temp.linux-x86_64-3.6/ext/_ruamel_yaml.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-myos8iv1/ruamel.yaml/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-record-vuvr4aoi/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-myos8iv1/ruamel.yaml/
答案 0 :(得分:1)
当不再依赖ruamel.yaml
时,从libyaml
中删除了测试编译是否有效的操作,并跳过了编译C扩展的操作。
那当然并不意味着C编译器可用,因此应将其视为回归。在ruamel.yaml>=0.15.41
中应解决此问题。