我正在尝试在Docker镜像中设置Python3.4,这让我很精神。我一直有这个问题,当我尝试使用pip安装python模块时我在终端中收到此错误:
vm.service = service;
没问题,我会尝试安装它,它安装,我再次运行它仍然得到错误。也许我应该试试python3-dev?:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
_configtest.o: In function `main':
/tmp/easy_install-wd8wc868/numpy-1.10.0.post2/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
我如何在新鲜的Docker镜像上出现此错误?这是我最初的Docker文件供参考:
root@238d2de76af1:/# apt-get install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-dev : Depends: libpython3-dev (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3.4-dev (>= 3.4.0-0~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.