Python - Windows下安装easy_install, pip 及whl文件安装方法

整理下easy_install的安装方法。有一键安装脚本!

安装easy_install

  1. 下载ez_setup.py

    from urllib import urlopen
    data = urlopen('http://peak.telecommunity.com/dist/ez_setup.py')
    with open('ez_setup.py', 'wb') as f:
        f.write(data.read())

  2. 在命令行中运行ez.setup.py
    命令行安装easy_install

  3. 一键脚本

    import os
    file_name = 'ez_setup.py'
    from urllib import urlopen
    data = urlopen('http://peak.telecommunity.com/dist/ez_setup.py')
    with open(file_name, 'wb') as f:
        f.write(data.read())
    os.system('python %s' % (os.path.join(os.getcwd(),file_name)))

安装pip


easy_install pip

命令行安装pip

安装whl文件


pip install whatever.whl

命令行安装.whl文件


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值