安装scrapy
需要用到的工具
homebrew->wget->pip->scrapy
#打开终端,安装homebrew
curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install
#如果brew命名不能用,卸载重装brew
curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/uninstall
#安装wget
brew install wget
#先安装pip,开vpn会很快
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
#Python3.8更新pip
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip
#由于Mac是自带Python2.7,pip安装scrapy是在Python2.7版本下
sudo pip install Scrapy -ihttps://pypi.douban.com/simple
#Python3.8.5安装scrapy,-ihttps://pypi.douban.com/simple镜像地址
pip3 install Scrapy -i https://pypi.douban.com/simple
网友评论