国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

mac安裝scrapy并創(chuàng)建項目的實例講解

2020-02-15 21:48:59
字體:
供稿:網(wǎng)友

最近剛好在學(xué)習(xí)python+scrapy的爬蟲技術(shù),因為mac是自帶python2.7的,所以安裝3.5版本有兩種方法,一種是升級,一種是額外安裝3.5版本。

升級就不用說了,講講額外安裝的版本吧~~~

因為python是有自帶版本的,最開始安裝的時候都會有一種“ 會不會沖突 ”的感覺。

其實安裝3.5版本也就是在官網(wǎng)上直接下載之后安裝,和普通的mac軟件安裝方式是一樣的~~

https://www.python.org/downloads/release/python-353/

安裝完成之后,不會覆蓋原來的python,會在 /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5文件中

在終端直接輸入 python 會執(zhí)行python2.7版本

python  Python 2.7.12 (default, Jun 29 2016, 14:05:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 

在終端直接輸入 python3 則會執(zhí)行python3.5版本

python3  Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 08:49:46) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 

接下來就可以開始安裝scrapy了

python3.5中會自帶 pip,所以不需要額外安裝了,可以直接在終端輸入 pip3 --version查看版本和路徑

pip3 --version  pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5) 

使用 pip3 安裝scrapy

pip3 install Scrapy 

這里的Scrapy一定要首字母大寫,不然會在安裝的過程中報錯~~

Collecting scrapy Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103aa2c88>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scrapy/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103aa29e8>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scrapy/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103aa2630>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scrapy/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103aa2f28>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scrapy/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x103aa2be0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scrapy/ Could not find a version that satisfies the requirement scrapy (from versions: )No matching distribution found for scrapy            
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 壤塘县| 章丘市| 汝城县| 二连浩特市| 神农架林区| 集贤县| 都兰县| 建德市| 阿克陶县| 崇州市| 皋兰县| 德惠市| 治县。| 武平县| 蕲春县| 邵阳县| 瑞昌市| 侯马市| 灌南县| 和顺县| 星座| 同仁县| 英吉沙县| 太和县| 阜城县| 安塞县| 南汇区| 定西市| 新蔡县| 阳高县| 嘉兴市| 广元市| 五寨县| 衡山县| 蓬溪县| 盐亭县| 同江市| 肇州县| 芦山县| 高尔夫| 鹿邑县|