1、安裝 pip ,組件管理套件
sudo easy_install pip
也可以根據 Python 選擇安裝 pip 版本
sudo easy_install-3.6 pip
sudo easy_install-2.7 pip
Django學習中的一些庫
2、Django
pip install django
或者sudo pip install django
3、MySQL數據庫
pip install PyMySQL
(python3中),詳情參見Mac系統配置MySQL環境
4、Pillow 提供圖片繪制相關API
pip install Pillow
5、django-tinymce 富文本編輯器
pip install django-tinymce
6、全文檢索
pip install django-haystack
pip install whoosh
pip install jieba
全文檢索不同于特定字段的模糊查詢,使用全文檢索的效率更高,并且能夠對于中文進行分詞處理
haystack:django的一個包,可以方便地對model里面的內容進行索引、搜索,設計為支持whoosh,solr,Xapian,Elasticsearc四種全文檢索引擎后端,屬于一種全文檢索的框架
whoosh:純Python編寫的全文搜索引擎,雖然性能比不上sphinx、xapian、Elasticsearc等,但是無二進制包,程序不會莫名其妙的崩潰,對于小型的站點,whoosh已經足夠使用
jieba:一款免費的中文分詞包,如果覺得不好用可以使用一些收費產品
scrapy學習中的一些庫
7、 BeautifulSoup4
作用:BeautifulSoup是一個可以從HTML或XML文件中提取數據的Python庫.
安裝:sudo pip install BeautifulSoup4
8、 jupyter notebook
作用:數據清理和轉換,數值模擬,統計建模,機器學習等
安裝:sudo pip install jupyter (或者 pip install jupyter )
9、Requests 庫
作用:自動爬取 HTML 頁面,自動網絡請求提交
安裝:sudo pip install requests
10、robots.txt
網站自己創建的一個地址文件
作用:網絡爬蟲排除標準
11、Re 庫
python 自帶,無需安裝
作用:正則表達式 python 庫
12、Scrapy *
https://pypi.python.org 對 Scrapy 爬蟲的一些第三方擴展庫
作用:專業的網絡爬蟲框架(一個軟件結構和功能組件的集合)
安裝:sudo pip install scrapy