ImportError: No module named 'pymongo'

Posted hi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: No module named 'pymongo'相关的知识,希望对你有一定的参考价值。

UBUNTU16.04,以python2.7创建了环境py2scrapy,

pip install pymongo,

import pymongo

在爬虫中出现错误:ImportError: No module named ‘pymongo‘

 how do you find where pip install packages ? Run following command :

pip show pymongo
Name: pymongo
Version: 3.6.0
Summary: Python driver for MongoDB <http://www.mongodb.org>
Home-page: http://github.com/mongodb/mongo-python-driver
Author: Bernie Hackett
Author-email: [email protected]
License: Apache License, Version 2.0
Location: /home/yun/.virtualenvs/py2scrapy/lib/python2.7/site-packages
vi ~/.bashrc
export PYTHONPATH=$PYTHONPATH:/home/yun/.virtualenvs/py2scrapy/lib/python2.7    /site-packages
source .bashrc

转: https://stackoverflow.com/questions/22885593/importerror-no-module-named-pymongo

以上是关于ImportError: No module named 'pymongo'的主要内容,如果未能解决你的问题,请参考以下文章

ImportError : No module named graphics

python27 ImportError: No module named site

Python中ImportError: No module named request

ImportError: No module named win32api

ImportError: No module named zookeeper 问题解决

ImportError: No module named PIL