0

I have python 2.7 and 3.5 on my machine , and i want start a new project using python 2.7 as a base interpreter, but whenever i do scrapy startproject <project name> it shows python 3.5 as the template directory,

New Scrapy project 'startproject', using template directory 'c:\\users\\user\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages\\scrapy\\templates\\project'

so my question is how can i change template directories from 3.5 to 2.7,

any help?

P.hunter
  • 1,345
  • 2
  • 21
  • 45
  • use [virtualenv](https://virtualenv.pypa.io/en/stable/userguide/), so you can define which python version to use for each environment – eLRuLL May 21 '17 at 14:52
  • See http://stackoverflow.com/a/18197237/5276801 to explain how to choose which interpreter a python script is ran from – RandomHash May 21 '17 at 14:54
  • @eLRuLL i did , it uses 2.7 for virtualenv because used `virtualenv -p ` but it doesn't work on scrapy – P.hunter May 21 '17 at 15:01

1 Answers1

0

I solved this problem by reinstalling scrapy in virtualenv and then vc python

P.hunter
  • 1,345
  • 2
  • 21
  • 45