user611105
user611105

Reputation:

Scrapy installation on OSX Lion

So I'm trying to install Scrapy on Lion and am not sure if it's properly installed or not.

I followed the guide here http://doc.scrapy.org/en/latest/intro/install.html#intro-install

Then tried to do the first step to create a tutorial project here,

http://doc.scrapy.org/en/latest/intro/tutorial.html

But when I try to run,

scrapy startproject tutorial

It doesn't work. I get...

$ python scrapy /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'scrapy': [Errno 2] No such file or directory

Any idea why I get such an error?

Upvotes: 4

Views: 8036

Answers (1)

wkl
wkl

Reputation: 79951

Well turns out it's likely a path issue.

On my Mac, I used easy_install from /usr/bin.

sudo /usr/bin/easy_install scrapy

The resulting scrapy command is then installed into /usr/local/bin/scrapy.

You might not have that directory in your path, so see if that's true with:

echo $PATH

If it isn't in there, you can temporarily add it like export PATH=/usr/local/bin:$PATH, or modify your ~/.bash_profile to add it permanently.


Alternatively, I typically don't use the system installed Python in Mac - I install homebrew and install a separate version of Python, and install scrapy with that version (scrapy is then installed into /usr/local/share/python/scrapy).

Upvotes: 16

Related Questions