1
我似乎有一些麻烦安装autopy.hautopy是否可以在本地安装?
https://github.com/msanders/autopy/#introduction
我已经通过GIT中尝试安装:
$ git clone git://github.com/msanders/autopy.git
$ cd autopy
$ python setup.py build
,但我得到了以下错误:
>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: No such file or directory
已丢失。这是因为ubuntu恨我,还是因为这个软件不能从git中编译?不幸的是,Easy_install需要访问我没有的/usr/local/lib/python2.6/dist-packages/
。我希望将本地库导入到我的代码中。
我可以通过突触来安装吗?或甚至更好的本地? – tarrasch
突触只是一个围绕apt-get的图形用户界面,所以是的,你可以。您只能*从本地安装apt-get包,所以我不知道您的第二个问题是什么意思。 – jterrace
安装python-dev2.6修复了它。谢谢。 – tarrasch