在ubuntu上安装python2.7的第三方包

  • 问题:在用pip安装的时候一直会显示一些问题比如说2.7停止了pip的使用
    Collecting beautifulsoup Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bc35868d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/beautifulsoup/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bc3586e90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/beautifulsoup/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bc3586890>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/beautifulsoup/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bc35861d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/beautifulsoup/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bc3586c50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/beautifulsoup/ Could not find a version that satisfies the requirement beautifulsoup (from versions: ) No matching distribution found for beautifulsoup
  • 解决办法:
  1. 在电脑上这个网站https://pypi.tuna.tsinghua.edu.cn/simple/中找到所需要下载的包以及版本,解压
  2. 用命令pip show numpy查询一个以及安装的第三方包安装的位置,这个时候就能找到第三方包安装的位置了
  3. 将解压后的包通过xftp软件将解压后的文件夹移动到第三方包安装的位置,接下来将目录切换到解压后的文件夹的目录下,执行命令python setup.py install,这个时候包已经安装成功了。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值