Scrapy requires python 2.7, but I already have

I primarily work on osx 10.6.8

I installed scrapy using the command:

sudo easy_install Scrapy

and everything seemed to be working fine. but when I try to create a new project using

scrapy startproject tutorial

i only

Scrapy 0.22.2 requires Python 2.7

scrapy

I tried this solution, but I have the same problem. how can i fix this?

EDIT: I think I understood the problem: easy-installreferrs to an old version of python (2.6) which is on my system under /Library/Python/2.6(maybe it was pre-installed), so I installed scrapy for python 2.6! why am I getting an error. but now I don’t know how to install scrapy for the correct version of python!

+4
3

i [] [1] :

sudo easy_install scrapy

!

0

Execute which python

python --version

, scrapy python2.7 .

+2

Please open /Library/Frameworks/Python.framework/Versions/2.7/site-packages/scrapy/__init__.pyand paste in line 14:

13 if sys.version_info < (2, 7):
14    print(sys.version_info)
15    print("Scrapy %s requires Python 2.7" % __version__)
16    sys.exit(1)

then scrapy startproject tutorialand show us the way out

0
source

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


All Articles