最新公告
  • 欢迎您光临起源地模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入钻石VIP
  • python中dev安装失败怎么办

    正文概述    2020-05-20   272

    python中dev安装失败怎么办

    安装tensorflow之前需要先安装python—dev, 这个不能用pip install来安装,只能用sudo apt-get install来安装。安装后会发现还要

    先装另外两个东西,但是装这两个东西也还要继续装其他东西,相当麻烦且并没有成功

    ~$ sudo apt-get install python-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:
     python-dev : Depends: libpython-dev (= 2.7.11-1) but it is not going to be installed
                  Depends: python2.7-dev (>= 2.7.11-1~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    用aptitude 工具可以搞定

    先:sudo apt-get install aptitude 

    然后:

    sudo aptitude install python-dev,之后会出现:

    sudo aptitude install python-dev
    The following NEW packages will be installed:
      libexpat1-dev{ab} libpython-dev{a} libpython2.7-dev{ab} python-dev 
      python2.7-dev{ab} 
    packages upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
    Need to get 28.1 MB of archives. After unpacking 42.1 MB will be used.
    The following packages have unmet dependencies:
     python2.7-dev : Depends: python2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 is installed.
                     Depends: libpython2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 is installed.
     libexpat1-dev : Depends: libexpat1 (= 2.1.0-7) but 2.1.0-7ubuntu0.16.04.2 is installed.
     libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 is installed.
                        Depends: libpython2.7 (= 2.7.11-2) but 2.7.12-1ubuntu0~16.04.1 is installed.
    open: 24; closed: 106; defer: 16; conflict: 21                                 .The following actions will 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        这里一定要n,因为给的solution是保持现在的状态,即不安装
    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/?] y     接受新状态就可以安装了

    起源地下载网 » python中dev安装失败怎么办

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    模板不会安装或需要功能定制以及二次开发?
    请QQ联系我们

    发表评论

    还没有评论,快来抢沙发吧!

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者

    请选择支付方式

    ×
    迅虎支付宝
    迅虎微信
    支付宝当面付
    余额支付
    ×
    微信扫码支付 0 元