Python-dev Installation

Source: Internet
Author: User

Install TensorFlow before installing Python-dev, this can not be installed with Pip install, can only be installed with sudo apt-get install. The installation will find that there are two other things to install, but the two things to continue to install other things, it is very troublesome and did not succeed

~$ sudo apt-get install python-devreading Package Lists ... Donebuilding Dependency Tree Reading state information ... Donesome Packages could notBe installed. This may mean the haverequested an impossible situationor ifYou is using the unstabledistribution that some required packages has notyet been createdorbeen moved out of Incoming.the following information could help to resolve the situation:the following packages has UN Met Dependencies:python-dev:depends:libpython-dev (= 2.7.11-1) but it is  notgoing to be installed Depends:python2.7-dev (>= 2.7.11-1~) but it is  notgoing to is installede:unable to correct problems and you have held broken packages.

It can be done with aptitude tools.
First: sudo apt-get install aptitude
And then:
sudo aptitude install Python-dev, which will then appear:

sudo aptitude install python-devthe following NEW packages 'll be INSTALLED:LIBEXPAT1-dev{ab} libpython-dev{a} Libpython2.7-dev{ab} python-Dev Python2.7-Dev{ab} 0 packages upgraded,5 newly installed, 0 to remove and1 notupgraded. Need to get28.1 MB of archives. After unpacking 42.1MB would be used. The following packages has unmet dependencies:python2.7-dev:depends:python2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 isinstalled. Depends:libpython2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 isinstalled. LIBEXPAT1-DEV:DEPENDS:LIBEXPAT1 (= 2.1.0-7) but 2.1.0-7ubuntu0.16.04.2 isinstalled. Libpython2.7-dev:depends:libpython2.7-stdlib (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 isinstalled. Depends:libpython2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1; closed:106; defer:16; Conflict:21                                 . The following actions would resolve these dependencies:keep the following packages at their current version:1) libexpat1-Dev [not installed]2) libpython-Dev [not installed]3) libpython2.7-Dev [not installed]4) python-Dev [not installed]5) python2.7-Dev [not installed] Accept this solution? [Y/n/q/?]  n here must be N, because the given solution is maintained in the present state, that is, do not install the following actions will resolve these dependencies:downgrade the Following packages:1) LIBEXPAT1 [2.1.0-7ubuntu0.16.04.2 (now)-2.1.0-7(xenial)]2) libpython2.7 [2.7.12-1ubuntu0~16.04.1 (now)-2.7.11-2(xenial)]3) Libpython2.7-minimal [2.7.12-1ubuntu0~16.04.1 (now)-2.7.11-2(xenial)]4) Libpython2.7-stdlib [2.7.12-1ubuntu0~16.04.1 (now)-2.7.11-2(xenial)]5) python2.7 [2.7.12-1ubuntu0~16.04.1 (now)-2.7.11-2(xenial)]6) Python2.7-minimal [2.7.12-1ubuntu0~16.04.1 (now)-2.7.11-2(xenial)] Accept this solution? [Y/n/q/?]yaccept the new status to install the

Python-dev Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.