python - 安装 python-snappy 的问题
问题描述
我正在尝试在 Amazon Linux EC2 实例中安装 python-snappy,但我不断收到以下错误,知道如何解决此问题:
sudo python3.6 -m pip install python-snappy
Collecting python-snappy
Using cached https://files.pythonhosted.org/packages/89/fe/a81a219c183c7e578b6f82d9c2425df045548877be6559358e8560c1e9fd/python-snappy-0.5.3.tar.gz
Installing collected packages: python-snappy
Running setup.py install for python-snappy ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-e07ios_o/python-snappy/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-k7rd94ik/install-record.txt --single-version-externally-managed --compile:
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'cffi_modules'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_cffi.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_formats.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/__init__.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/snappy_cffi_builder.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/__main__.py -> build/lib.linux-x86_64-3.6/snappy
copying snappy/hadoop_snappy.py -> build/lib.linux-x86_64-3.6/snappy
running build_ext
building 'snappy._snappy' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/snappy
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c snappy/snappymodule.cc -o build/temp.linux-x86_64-3.6/snappy/snappymodule.o
gcc: error trying to exec 'cc1plus': execvp: 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-e07ios_o/python-snappy/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-k7rd94ik/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-e07ios_o/python-snappy/
解决方案
推荐阅读
- javascript - FileReader onLoad 未触发
- java - Android API 版本 27 仍使用 SQLite 3.8。如何更新到 SQLite 数据库 3.19?
- python - 在 python 中显示 10 个第一个素数斐波那契数
- c - sscanf 和 scanset 停止读取十六进制数字
- python - Creating a GUI for Selenium
- java - How do I solve the error: Failed to load keystore type [PKCS12 ]
- vuejs2 - Vuetify v-data-table drag and resizable columns together
- r - Results from MATLAB's crosscorr function and R's ccf different
- c# - How do I save data in related tables?
- javascript - 使用 discord.js v12 的 rate 命令