我正在运行 Ubuntu 15.10。
我已遵循本指南中的所有内容 如何使用 Ubuntu 13.10 设置 Dual Shock 4 控制器?
但当我这样做
sudo pip install ds4drv
我收到这个错误
evdev/input.c:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-tOdKBQ/evdev/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vQVfkA-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-tOdKBQ/evdev
Storing debug log for failure in /home/charlie/.pip/pip.log
答案1
解决方案似乎是安装 pyton-dev 或类似的包:
https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory