码迷,mamicode.com
首页 > 其他好文 > 详细

ImportError: No module named 'pymongo'

时间:2018-01-08 18:30:52      阅读:2350      评论:0      收藏:0      [点我收藏+]

标签:apache   author   source   org   lib   location   port   overflow   创建   

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: bernie@mongodb.com
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'

标签:apache   author   source   org   lib   location   port   overflow   创建   

原文地址:https://www.cnblogs.com/hizf/p/8243823.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!