Scrapy: unable to create project

I had trouble installing scrapy with respect lxml, but then I found some information about stackoverflow. Based on this information, I made sudo easy_install lxmlwith some mistake, I think that scrapy was installed:

The reason I came to this decision is because I push that I can do the following:

Python 2.7.5 (default, Jul 28 2013, 07:27:04) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scrapy import *
>>> 

But when I try to make a shooting tutorial , I get the following error:

$ scrapy startproject tutorial
Traceback (most recent call last):
  File "/usr/local/bin/scrapy", line 4, in <module>
    import pkg_resources
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: lxml
+3
source share
1 answer

According to this thread :

Mac, pip easy_install .

Try:

sudo easy_install --upgrade lxml 
sudo easy_install --upgrade scrapy
+5

Source: https://habr.com/ru/post/1531920/


All Articles