Python3安裝BeautifulSoup

來源:互聯網
上載者:User

標籤:python   beautifulsoup   

原料:python3或者以上

            BeautifulSoup4以上

1、在DOS視窗輸入:

            python f:\python36\beautifulsoup4-4.5.1\setup.py install


                   650) this.width=650;" src="https://s1.51cto.com/wyfs02/M01/8C/EC/wKioL1h-OLLh-HkGAAA-1Rd3yqU568.png-wh_500x0-wm_3-wmp_4-s_1738334373.png" title="QQ20170117233012.png" alt="wKioL1h-OLLh-HkGAAA-1Rd3yqU568.png-wh_50" />

            說明BeautifulSoup暫時安裝成功。

                運行650) this.width=650;" src="https://s4.51cto.com/wyfs02/M00/8C/EC/wKioL1h-OUzD1Ei2AAAj7RXNpsA895.png-wh_500x0-wm_3-wmp_4-s_776295257.png" title="QQ20170117233256.png" alt="wKioL1h-OUzD1Ei2AAAj7RXNpsA895.png-wh_50" />

                 提示bs支援python2不支援python3,需要用命令2to3 -w bs4將bs4轉換成python3支援的

2:關鍵步驟:

                 將beautifulsoup4-4.5.1下的bs4檔案夾剪下到python下的Lib目錄執行:2to3 -w bs4

                650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/8C/EC/wKioL1h-O13hzCApAABQKxb99TI090.png-wh_500x0-wm_3-wmp_4-s_2339414113.png" title="QQ20170117234212.png" alt="wKioL1h-O13hzCApAABQKxb99TI090.png-wh_50" />

                執行成功,如果 不成功,重新開啟一個DOS視窗,進到剛才的目錄重新執行。

3,驗證:

        650) this.width=650;" src="https://s1.51cto.com/wyfs02/M00/8C/EC/wKioL1h-O9fzbhmGAAANb074C0I172.png-wh_500x0-wm_3-wmp_4-s_1834369719.png" title="QQ20170117234419.png" alt="wKioL1h-O9fzbhmGAAANb074C0I172.png-wh_50" />    

        沒有報異常,說明 已經成功。



本文出自 “祝融與火” 部落格,請務必保留此出處http://notezr.blog.51cto.com/9424982/1892745

Python3安裝BeautifulSoup

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.