Error in creating LMDB database file in Python for Caffe

不羁岁月 提交于 2019-11-29 07:25:40
PrasannaDate

Well, the apt-get install liblmdb-dev might work with bash (in the terminal) but apparently it doesn't work with Anaconda Python. I figured Anaconda Python might require it's own module for lmdb and I followed this link. The Python installation for lmdb module can be performed by running the command pip install lmdb in the terminal. And then import lmdb in Python works like a charm!

The above installation commands may require sudo.

If you're using Anaconda, then this can solve your problem (it worked for me):

conda install -c https://conda.binstar.org/dougal lmdb

For Anaconda users, installing python-lmdb package from conda-forge should fix the lmdb import error:

conda install -c conda-forge python-lmdb

This was tested on conda 4.5.11 on an lxc-containerized system running Ubuntu 18.04.

Note that there is a conda package named lmdb (without python-), installable via:

conda install -c conda-forge lmdb

that does not fix the import error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!