scrapy crawl命令使用错误的python解释器(不是当前)

时间:2019-10-25 19:29:18

标签: python scrapy virtualenv

我正在尝试运行scrapy蜘蛛之类的游戏; scrapy crawl myspider,但会引发错误。

我注意到此错误是因为scrapy而不是python 3.5正在运行python 3.6

(sport_databasevenv) futilestudio@DRUHY-ubuntu-s-1vcpu-1gb-fra1-01-1538126914964-s-2vcpu-2gb-fra1-:~/sport_database/scraping$ scrapy crawl op_index
Traceback (most recent call last):
  File "/usr/local/bin/scrapy", line 11, in <module>
    sys.exit(execute())
  File "/usr/local/lib/python3.5/dist-packages/scrapy/cmdline.py", line 149, in execute
    cmd.crawler_process = CrawlerProcess(settings)
  File "/usr/local/lib/python3.5/dist-packages/scrapy/crawler.py", line 249, in __init__
    super(CrawlerProcess, self).__init__(settings)

但是当我这样做时,我看到激活的环境使用python 3.6:

(sport_databasevenv) futilestudio@DRUHY-ubuntu-s-1vcpu-1gb-fra1-01-1538126914964-s-2vcpu-2gb-fra1-:~/sport_database/scraping$ python
Python 3.6.5 (default, May  3 2018, 10:08:28) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

那么问题出在哪里?

0 个答案:

没有答案