On Ubuntu 14.04.4 LTS I was trying to install courseara-dl with the default python 3.4.3 and met the error:
src/MD2.c:31: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
----------------------------------------
Failed building wheel for pycrypto
I have seen some answers mentioning installing python3.4-dev
to solve this problem. But there is dependency error:
The following packages have unmet dependencies:
python3.4-dev : Depends: python3.4 (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed
Depends: libpython3.4-dev (= 3.4.0-2ubuntu1) but it is not going to be installed
Depends: libpython3.4 (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed
Depends: libexpat1-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What is the recommended way to fix this? Do I have to downgrade to python3.4.0
? If so, what's the proper way to do that?
When I run dpkg -l | grep python 3
, I see both 3.4.0 and 3.4.3. Should I try apt-get uninstall 3.4.3
?
ii python3 3.4.0-0ubuntu2 amd64 interactive high-level object-oriented language (default python3 version)
ii python3.4 3.4.3-1ubuntu1~14.04.3 amd64 Interactive high-level object-oriented language (version 3.4)