Scrapy 已安装,但无法从命令行运行 [英] Scrapy installed, but won't run from the command line
问题描述
我正在尝试在 ubuntu 机器上使用 scrapy 运行我在 python 中编写的抓取程序.已安装 Scrapy.我可以导入直到 python 没问题,当尝试 pip install scrapy
我得到 p><块引用>
需求已经满足(使用--upgrade升级):scrapy in/system/linux/lib/python2.7/dist-packages
当我尝试从命令运行scrapy时,例如scrapy crawl ...
,我得到了.
当前未安装程序scrapy".
这是怎么回事?符号链接是否搞砸了?以及如何解决它的任何想法?
如果没有 sudo,pip 会安装到 $HOME/.local/bin、$HOME/.local/lib 等中.将以下行添加到您的 ~/.local/lib 中.bashrc 或 ~/.profile(或其他 shell 的适当位置):
export PATH="${PATH}:${HOME}/.local/bin"
然后打开一个新的终端或重新加载.bashrc,它应该会找到命令.
I'm trying to run a scraping program I wrote for in python using scrapy on an ubuntu machine. Scrapy is installed. I can import until python no problem and when try pip install scrapy
I get
Requirement already satisfied (use --upgrade to upgrade): scrapy in /system/linux/lib/python2.7/dist-packages
When I try to run scrapy from the command, with scrapy crawl ...
for example, I get.
The program 'scrapy' is currently not installed.
What's going on here? Are the symbolic links messed up? And any thoughts on how to fix it?
Without sudo, pip installs into $HOME/.local/bin, $HOME/.local/lib, etc. Add the following line to your ~/.bashrc or ~/.profile (or the appropriate place for other shells):
export PATH="${PATH}:${HOME}/.local/bin"
then open a new terminal or reload .bashrc, and it should find the command.
这篇关于Scrapy 已安装,但无法从命令行运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!