0

i am running scrapy 0.24.4 and it need python2.7. so i install python2.7 in /usr/local/bin/

and create name.sh file to run my script:

cd /home/user/public_html/dir/
PATH=$PATH:/usr/local/bin
export PATH
scrapy crawl script-call

and set crontab :

* * * * * /root/name.sh

but it gives me output :

Scrapy 0.24.4 requires Python 2.7
John
  • 1
  • How was scrapy installed? You need to use your python2.7 executable when installing scrapy. – unutbu Sep 26 '14 at 20:14
  • after python installation i run :pip install Scrapy. – John Sep 26 '14 at 20:24
  • my output : root@server [~]# which python>> /usr/local/bin/python ;;root@server [~]# python -V >> Python 2.7.6 – John Sep 26 '14 at 20:26
  • Each pip executable is linked to a particular installation of python. So was your pip installed using your new python2.7 installation? If not, you need to [install a new pip using your python2.7](http://stackoverflow.com/q/5585875/190597), and then use *that* pip to install scrapy. – unutbu Sep 26 '14 at 20:30

1 Answers1

1

Order is significant. In order to pick your desired python, instead of:

PATH=$PATH:/usr/local/bin
export PATH

have:

export PATH=/usr/local/bin:${PATH}
Yotam
  • 808
  • 8
  • 10