报错信息:
pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application
根据提示信息可以知道distribution没有安装,所以就安装一下:
$wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
$tar -xzvf distribute-0.6.10.tar.gz
$cd distribute-0.6.10
$python setup.py install
然后安装pip 1.5.4
easy_install pip==1.5.4
现在运行scrapy报错:
bash: scrapy: command not found
这就是Path里没有找到scrapy,现在scrapy在/usr/local/bin/scrapy里,所以在Path里做一个软连接到这儿就可以。
$cd /usr/bin/ | ll | grep scrapy # 检查是否存在
$ln -s /usr/local/bin/scrapy /usr/bin/scrapy # 新建一个软连接
$scrapy list # 测试成功
参考:
https://blog.csdn.net/daiyutage/article/details/69945850
https://blog.csdn.net/EDDYCJY/article/details/77482228?locationNum=6&fps=1