sudo apt install python-pip命令安装pip工具,然后使用pip install scrapy直接安装scrapy,出现下列错误
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lRw66x/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-TpiUxu-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lRw66x/cryptography/
解决方法(安装所需的依赖):
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev