linux 安装clickhouse_driver出现错误:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c clickhouse_driver/bufferedreader.c -o build/temp.linux-x86_64-3.6/clickhouse_driver/bufferedreader.o clickhouse_driver/bufferedreader.c:19:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-w5x91rjz/clickhouse-driver/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-xmhi2dby-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbb1re1j5" failed with error code 1 in /tmp/pip-build-w5x91rjz/clickhouse-driver/
时间: 2024-03-08 11:48:56 浏览: 216
arm-linux-gcc-4.6.4-arm-x86-64交叉编译器安装包(含详细安装教程)
这个错误提示是由于缺少Python开发包导致的。您可以使用以下命令来安装Python开发包:
- 对于Debian/Ubuntu系统:
```
sudo apt-get install python-dev
```
- 对于CentOS/RHEL系统:
```
sudo yum install python-devel
```
安装完成后,再重新运行clickhouse_driver的安装命令即可。
阅读全文