__import__(name)
File "/home/shenjianlin/my_project/Espider/Espider/pipelines/XiaoMiQuanPipeLines.py", line 4, in <module>
import pymongo
exceptions.ImportError: No module named pymongo
2018-09-28 19:10:15 [twisted] CRITICAL:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/usr/lib64/python2.7/site-packages/scrapy/crawler.py", line 98, in crawl
six.reraise(*exc_info)
File "/usr/lib64/python2.7/site-packages/scrapy/crawler.py", line 80, in crawl
self.engine = self._create_engine()
File "/usr/lib64/python2.7/site-packages/scrapy/crawler.py", line 105, in _create_engine
return ExecutionEngine(self, lambda _: self.stop())
File "/usr/lib64/python2.7/site-packages/scrapy/core/engine.py", line 70, in __init__
self.scraper = Scraper(crawler)
File "/usr/lib64/python2.7/site-packages/scrapy/core/scraper.py", line 71, in __init__
self.itemproc = itemproc_cls.from_crawler(crawler)
File "/usr/lib64/python2.7/site-packages/scrapy/middleware.py", line 58, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File "/usr/lib64/python2.7/site-packages/scrapy/middleware.py", line 34, in from_settings
mwcls = load_object(clspath)
File "/usr/lib64/python2.7/site-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/shenjianlin/my_project/Espider/Espider/pipelines/XiaoMiQuanPipeLines.py", line 4, in <module>
import pymongo
ImportError: No module named pymongo
shenjianlin@newdev:~/my_project/Espider/Espider(master)$ pip3 install pymongo
Requirement already satisfied: pymongo in /usr/lib64/python3.4/site-packages
I would like to ask, the default python2.7 of this kind of python says that I don"t have pymongo, but I have
under python3.