首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Python3 -使用bsdiff模块

Python3 -使用bsdiff模块
EN

Ask Ubuntu用户
提问于 2014-08-11 21:58:15
回答 1查看 1.5K关注 0票数 0

如何将bsdiff模块与Python一起使用?虽然我可以使用shell脚本,但我更希望有一个跨平台的解决方案。

我下载了bsdiff4-1.1.4并尝试按以下方式运行setup.py:

档案清单:

代码语言:javascript
运行
复制
bsdiff4  build  CHANGELOG.txt  do.sh  examples  Makefile  README.rst  setup.py

我跑:

代码语言:javascript
运行
复制
python3 setup.py build

我得到了一个错误:

代码语言:javascript
运行
复制
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option:     'entry_points'
  warnings.warn(msg)
running build
running build_py
running build_ext
building 'bsdiff4.core' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g     -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security     -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c bsdiff4/core.c -o build/temp.linux-x86_64-3.4/bsdiff4/core.o
bsdiff4/core.c:8:20: fatal error: Python.h: No such file or directory
#include <Python.h>
                ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2014-11-12 22:01:06

需要安装python3 3-dev

代码语言:javascript
运行
复制
sudo apt-get install python3-dev
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/509969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档