Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrapy installed, but won't run from the command line

Tags:

python

scrapy

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?

like image 555
ekrose Avatar asked Jun 10 '16 21:06

ekrose


1 Answers

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.

like image 198
AdamF Avatar answered Oct 06 '22 09:10

AdamF