Homebrew
Homebrew是一款非常強大的可以應用在MAC中的Linux管理包轧葛,如果上面的方法感覺比較麻煩纠永,我們可以通過下面的方法解決。
A - 執(zhí)行安裝brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
進入終端之后,執(zhí)行brew的安裝洪唐。
B - 安裝 wget
brew install wget
C wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
D xcode-select —install
sudo pip install Scrapy -i https://pypi.douban.com/simple
錯誤參考
- OSError: [Errno 1] Operation not permitted:
解決: 重新啟動Mac OS
重啟時按住Command+R僚祷,進入Recovery模式
在Recovery模式中輸入:
csrutil disable;
重新啟動佛致,回到Mac OS
TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
解決:sudo pip install twisted==13.1.0
- OSError: [Errno 13] Permission denied 權限問題
前面加sudo
命令
- sudo pip install Scrapy -i https://pypi.douban.com/simple 安裝scrapy 指定源
- pip list //pip 已經裝了的庫
已安裝成功的庫
altgraph (0.10.2)
asn1crypto (0.22.0)
attrs (17.2.0)
Automat (0.6.0)
bdist-mpkg (0.5.0)
bonjour-py (0.3)
cffi (1.10.0)
constantly (15.1.0)
cryptography (1.9)
cssselect (1.0.1)
enum34 (1.1.6)
execute (1.2)
hyperlink (17.2.1)
idna (2.5)
incremental (17.5.0)
ipaddress (1.0.18)
lxml (3.8.0)
macholib (1.5.1)
matplotlib (1.3.1)
modulegraph (0.10.4)
numpy (1.13.0)
parsel (1.2.0)
pip (9.0.1)
py2app (0.7.3)
pyasn1 (0.2.3)
pyasn1-modules (0.0.9)
pycparser (2.17)
PyDispatcher (2.0.5)
pyobjc-core (2.5.1)
pyobjc-framework-Accounts (2.5.1)
pyobjc-framework-AddressBook (2.5.1)
pyobjc-framework-AppleScriptKit (2.5.1)
pyobjc-framework-AppleScriptObjC (2.5.1)
pyobjc-framework-Automator (2.5.1)
pyobjc-framework-CFNetwork (2.5.1)
pyobjc-framework-Cocoa (2.5.1)
pyobjc-framework-Collaboration (2.5.1)
pyobjc-framework-CoreData (2.5.1)
pyobjc-framework-CoreLocation (2.5.1)
pyobjc-framework-CoreText (2.5.1)
pyobjc-framework-DictionaryServices (2.5.1)
pyobjc-framework-EventKit (2.5.1)
pyobjc-framework-ExceptionHandling (2.5.1)
pyobjc-framework-FSEvents (2.5.1)
pyobjc-framework-InputMethodKit (2.5.1)
pyobjc-framework-InstallerPlugins (2.5.1)
pyobjc-framework-InstantMessage (2.5.1)
pyobjc-framework-LatentSemanticMapping (2.5.1)
pyobjc-framework-LaunchServices (2.5.1)
pyobjc-framework-Message (2.5.1)
pyobjc-framework-OpenDirectory (2.5.1)
pyobjc-framework-PreferencePanes (2.5.1)
pyobjc-framework-PubSub (2.5.1)
pyobjc-framework-QTKit (2.5.1)
pyobjc-framework-Quartz (2.5.1)
pyobjc-framework-ScreenSaver (2.5.1)
pyobjc-framework-ScriptingBridge (2.5.1)
pyobjc-framework-SearchKit (2.5.1)
pyobjc-framework-ServiceManagement (2.5.1)
pyobjc-framework-Social (2.5.1)
pyobjc-framework-SyncServices (2.5.1)
pyobjc-framework-SystemConfiguration (2.5.1)
pyobjc-framework-WebKit (2.5.1)
pyOpenSSL (0.13.1)
pyparsing (2.0.1)
python-dateutil (1.5)
pytz (2013.7)
queuelib (1.4.2)
scikit-learn (0.18.1)
scipy (0.19.0)
Scrapy (1.4.0)
service-identity (17.0.0)
setuptools (18.5)
six (1.10.0)
Twisted (13.1.0)
virtualenv (15.1.0)
w3lib (1.17.0)
wheel (0.29.0)
xattr (0.6.4)
zope.interface (4.1.1)
me:~ apple$ scrapy
Scrapy 1.4.0 - no active project
運行 scrapy crawl quotes
哈哈
vim ~/.bash_profile
source ~/.bash_profile