windows下安裝easy_install, pip 及whl檔案安裝方法

來源:互聯網
上載者:User

標籤:

寫在前面的話

最近在看"Computer Vision with Python"需要安裝PIL庫,平時一直在windows下開發,就去"Python Extensions for Windows"下找找看,結果下下來檔案的拓展名是.whl。Google了一番才知道安裝這種拓展名的包需要pip。平時習慣用.exe安裝包,easy_install、pip都沒裝。扒拉點資料,整理下easy_install的安裝方法。有一鍵安裝指令碼!

安裝easy_install
  1. 下載ez_setup.py

    from urllib import urlopendata = 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

  3. 一鍵指令碼

    import osfile_name = ‘ez_setup.py‘from urllib import urlopendata = 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

安裝whl檔案
pip install whatever.whl

 

原文連結:http://www.cnblogs.com/wu-wenmin/p/4250330.html

windows下安裝easy_install, pip 及whl檔案安裝方法

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.