场景1:
ubuntu安装scrapy后,在python2.7解释器上导入scrapy时报错:
No module named twisted.persisted.styles
解决:
sudo pip install twisted --upgrade
场景2:
使用命令scrapy startproject xxx时报错:
No module named cryptography / ImportError: No module named enum / ImportError: cannot import name certificate_transparency
解决:
pip install paramiko
sudo pip install --upgrade pip
sudo scrapy startproject xxx
说明:ubnutu上使用普通用户在cmd中操作遇到报错时,最好在命令前面加上sudo再试,不行再寻找其他方法.