首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >自动安装可以在本地安装吗?

自动安装可以在本地安装吗?
EN

Stack Overflow用户
提问于 2012-06-13 15:45:33
回答 1查看 1.3K关注 0票数 1

我似乎在安装自动测试时遇到了一些困难。

代码语言:javascript
复制
https://github.com/msanders/autopy/#introduction

我已经尝试过通过git安装:

代码语言:javascript
复制
$ git clone git://github.com/msanders/autopy.git
$ cd autopy
$ python setup.py build

但我得到了以下错误:

代码语言:javascript
复制
>python setup.py build 
running build
running build_py
running build_ext
building 'color' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DNDEBUG=1 -DMM_LITTLE_ENDIAN -DUSE_X11 -I/usr/include/python2.6 -c src/autopy-color-module.c -o build/temp.linux-i686-2.6/src/autopy-color-module.o -Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wshadow
In file included from src/autopy-color-module.c:1:
src/autopy-color-module.h:5:20: error: Python.h: No such file or directory
In file included from src/autopy-color-module.c:1:
src/autopy-color-module.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcolor’
...
src/autopy-color-module.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
error: command 'gcc' failed with exit status 1

所以

src/autopy color-module.h:5:20: error: Python.h:没有这样的文件或目录

失踪了。这是因为ubuntu讨厌我,还是因为软件不能从git编译?不幸的是,Easy_install需要访问我没有的/usr/local/lib/python2.6/dist-packages/。我希望在本地将这个库导入我的代码中。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-13 15:49:44

您没有python的开发头。既然您在Ubuntu上,只需安装python包:

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

https://stackoverflow.com/questions/11018595

复制
相关文章

相似问题

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