Можно ли установить autopy локально?
Кажется, у меня возникли проблемы с установкой autopy.h
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: ошибка: Python.h: нет такого файла или каталога
пропал, отсутствует. Это потому, что Ubuntu ненавидит меня, или это потому, что программное обеспечение просто не компилируется из Git? Easy_install, к сожалению, нужен доступ к /usr/local/lib/python2.6/dist-packages/
которого у меня нет. Я надеялся импортировать библиотеку локально в мой код.
1 ответ
Решение
У вас нет заголовков разработки для Python. Поскольку вы работаете в Ubuntu, просто установите пакет python-dev:
apt-get install python-dev