"ImportError: No module named lmdb" when I want to use python to write to a lmdb?

15,606 views
Skip to first unread message

Wei Guo

unread,
Feb 8, 2015, 7:34:43 AM2/8/15
to caffe...@googlegroups.com
      What's the problem? I have install lmdb following the install instruction on caffe site and can test the examples.


thanks,
wei guo
Message has been deleted

Wei Guo

unread,
Feb 8, 2015, 7:58:01 AM2/8/15
to caffe...@googlegroups.com
I installed the lmdb as this link (https://lmdb.readthedocs.org/en/release/). Then I have the error: 
               " ImportError: No module named caffe" 

I read the link (https://github.com/BVLC/caffe/issues/263) ,but I still don't know how to set the " PATHONPATH " in ubuntu 14.04.
Who can help me?

Jianbo Yang

unread,
Apr 13, 2015, 8:42:00 AM4/13/15
to caffe...@googlegroups.com
I have the same problem. Have you solved it?


On Sunday, February 8, 2015 at 8:34:43 PM UTC+8, Wei Guo wrote:

Prasanna Date

unread,
Jun 10, 2015, 7:09:43 PM6/10/15
to caffe...@googlegroups.com
Has anyone been able to address this issue yet? I'm trying to create a LMDB data base according to this tutorial. In python environment, "import caffe" runs fine. However, when I try to run "import lmdb" I'm getting the folllowing error:

>>> import lmdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lmdb

Wei Wen

unread,
Jul 11, 2015, 6:46:32 PM7/11/15
to caffe...@googlegroups.com
Have u fixed it? How?

Wei Yang

unread,
Aug 18, 2015, 10:59:11 PM8/18/15
to Caffe Users
for Anaconda python, try

pip install lmdb

otherwise try

sudo apt-get install liblmdv-dev


在 2015年2月8日星期日 UTC+8下午8:34:43,Wei Guo写道:

Jaya

unread,
May 15, 2017, 2:22:01 AM5/15/17
to Caffe Users
even after doing pip install lmdb I am getting the same error.
What should I do next?

Jonathan Balloch

unread,
Jul 10, 2017, 12:30:04 AM7/10/17
to Caffe Users
This may not be helpful as I know that this thread is old, but I encountered an similar error, and I *needed* to pip install lmdb, even after installing it apt-get install liblmdb-dev. If this method isn't working for you, double check that your caffe python interpreter, default terminal python interpreter (i.e. if you run pip in the terminal), and your IDE interpreter are all the same. You could be installing lmdb with one and then testing with another. 

Karim Moradi

unread,
Apr 9, 2018, 12:44:44 PM4/9/18
to Caffe Users
Hi Jonathan Balloch,

Those two commands solved the issue for me

pip install lmdb,
apt-get install liblmdb-dev

Thanks
Reply all
Reply to author
Forward
0 new messages