Python 3.4 and 2.7: Cannot install numpy package for python 3.4

前端 未结 2 1415
悲哀的现实
悲哀的现实 2020-12-14 14:56

I am using Ubuntu 12.04 and want to use python 3.4 side by side with python 2.7.

The installation of python 3.4 worked properly. However, I cannot install the numpy

相关标签:
2条回答
  • 2020-12-14 15:32

    You have not installed the Python 3 development package. Install python3.4-dev:

    apt-get install python3.4-dev
    

    The main package never includes the development headers; Debian (and by extension Ubuntu) package policy is to put those into a separate -dev package. To install numpy however, you need these files to be able to compile the extension.

    0 讨论(0)
  • 2020-12-14 15:49

    Solved by incrementing the python-dev package until I hit the right one. May need to be incremented further in the future. Poor implementation by python developers.

    sudo apt-get install python3.7-dev

    0 讨论(0)
提交回复
热议问题