I tried to run scrapy in my centOs. Since centos comes with python2.6 installed and scrapy requires python2.7, I tried creating virtual environment and ran scrapy inside that, but I still get error
Scrapy 0.24.4 requires Python 2.7.
These are my output on starting the spider
(scrapyproject)[imadmin@IM03 tutorial]$ python --version
Python 2.7.6
(scrapyproject)[imadmin@IM03 tutorial]$ scrapy gen_spider
Scrapy 0.24.4 requires Python 2.7
I even tried setting up a shell alias:
alias python=/usr/local/bin/python2.7
This also didnt work.
Thanks
You have to install scrapy inside the virtual environment (i.e. run pip install scrapy after activating virtual env "scrapyproject").
The way you are doing it now, scrapy command cannot be found inside virtual env, so it is called outside of virtual env.
P.S. Delete the alias.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With