Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmdb is installed but could not imported #8740

Closed
yoonghm opened this issue Mar 3, 2018 · 2 comments
Closed

lmdb is installed but could not imported #8740

yoonghm opened this issue Mar 3, 2018 · 2 comments

Comments

@yoonghm
Copy link

yoonghm commented Mar 3, 2018

Actual Behavior

I installed lmdb using the following command

conda install --name base lmdb

Expected Behavior

Run python
>>> import lmdb
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'lmdb'

Steps to Reproduce

Install lmdb into base environment
Run python and import lmdb

Anaconda or Miniconda version:

Anaconda 5.1.0

Operating System:

Windows 10

conda info

conda list --show-channel-urls
     active environment : None
       user config file : C:\Users\Yoonghm\.condarc
 populated config files : C:\Users\Yoonghm\.condarc
          conda version : 4.4.11
    conda-build version : 3.4.1
         python version : 3.6.4.final.0
       base environment : C:\util\Anaconda3  (writable)
           channel URLs : https://repo.continuum.io/pkgs/main/win-64
                          https://repo.continuum.io/pkgs/main/noarch
                          https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/win-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
          package cache : C:\util\Anaconda3\pkgs
                          C:\Users\Yoonghm\AppData\Local\conda\conda\pkgs
       envs directories : C:\util\Anaconda3\envs
                          C:\Users\Yoonghm\AppData\Local\conda\conda\envs
                          C:\Users\Yoonghm\.conda\envs
               platform : win-64
             user-agent : conda/4.4.11 requests/2.18.4 CPython/3.6.4 Windows/10 Windows/10.0.16299
          administrator : False
             netrc file : None
           offline mode : False
@yoonghm yoonghm changed the title lmdb is not installed lmdb is installed but could not imported Mar 3, 2018
@wilsbj
Copy link

wilsbj commented Mar 3, 2018

"conda install lmbd" installs the c libraries for the database application itself. The python package "lmdb" is actually in the conda package "python-lmdb".

Anaconda only has a linux version of this package, but there is a windows version on conda-forge. To install it, run

conda install --name base -c conda-forge python-lmdb

Running python, it should now import

>>> import lmdb
>>> 

@yoonghm
Copy link
Author

yoonghm commented Mar 4, 2018

@wilsbj thanks. It works.

The installation log is shown below. Since python-lmdb from conda-forge channel for Windows 10 platform has the following symptoms:

  • This steps will downgrade and upgrade some packages. It seems that lmdb (for Windows as you mentioned) is not yet updated. The latest lmdb version is 0.93 but this is this one is 0.92.

  • They may be an error The batch file cannot be found. in the last part of the log

  • This step changed base environments to root environment

  • I tried pip install lmdb which really installed lmdb 0.93 (and surely python-lmdb too)

C:\Users\Yoonghm>conda install --name base -c conda-forge python-lmdb
Solving environment: done

## Package Plan ##

  environment location: C:\util\Anaconda3

  added / updated specs:
    - python-lmdb


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    libxml2-2.9.5              |           vc14_1         3.2 MB  conda-forge
    conda-4.3.34               |           py36_0         540 KB  conda-forge
    curl-7.55.1                |           vc14_0         339 KB  conda-forge
    openssl-1.0.2n             |           vc14_0         5.4 MB  conda-forge
    yaml-0.1.7                 |           vc14_0         103 KB  conda-forge
    zlib-1.2.11                |           vc14_0         119 KB  conda-forge
    libiconv-1.14              |           vc14_4         670 KB  conda-forge
    freetype-2.8.1             |           vc14_0         469 KB  conda-forge
    libpng-1.6.34              |           vc14_0         547 KB  conda-forge
    python-lmdb-0.92           |           py36_0         114 KB  conda-forge
    qt-5.6.2                   |           vc14_1        55.6 MB  conda-forge
    libxslt-1.1.32             |           vc14_0         456 KB  conda-forge
    winpty-0.4.3               |           vc14_2         126 KB  conda-forge
    certifi-2018.1.18          |           py36_0         144 KB  conda-forge
    hdf5-1.10.1                |           vc14_2        17.9 MB  conda-forge
    sqlite-3.22.0              |           vc14_0         907 KB  conda-forge
    ca-certificates-2018.1.18  |                0         178 KB  conda-forge
    tk-8.6.7                   |           vc14_0         3.5 MB  conda-forge
    lxml-4.1.1                 |           py36_0         1.1 MB  conda-forge
    bzip2-1.0.6                |           vc14_1         144 KB  conda-forge
    jpeg-9b                    |           vc14_2         314 KB  conda-forge
    krb5-1.14.2                |           vc14_0         746 KB  conda-forge
    libtiff-4.0.9              |           vc14_0         616 KB  conda-forge
    lzo-2.10                   |           vc14_0         154 KB  conda-forge
    icu-58.2                   |           vc14_0        21.8 MB  conda-forge
    anaconda-custom            |   py36h363777c_0           9 KB
    libssh2-1.8.0              |           vc14_2         184 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       115.1 MB

The following NEW packages will be INSTALLED:

    krb5:            1.14.2-vc14_0         conda-forge [vc14]
    python-lmdb:     0.92-py36_0           conda-forge

The following packages will be UPDATED:

    anaconda:        5.1.0-py36_2                      --> custom-py36h363777c_0
    ca-certificates: 2017.08.26-h94faf87_0             --> 2018.1.18-0           conda-forge
    certifi:         2018.1.18-py36_0                  --> 2018.1.18-py36_0      conda-forge
    freetype:        2.8-h51f8f2c_1                    --> 2.8.1-vc14_0          conda-forge [vc14]
    hdf5:            1.10.1-h98b8871_1                 --> 1.10.1-vc14_2         conda-forge [vc14]
    jpeg:            9b-hb83a4c4_2                     --> 9b-vc14_2             conda-forge [vc14]
    libpng:          1.6.34-h79bbb47_0                 --> 1.6.34-vc14_0         conda-forge [vc14]
    libtiff:         4.0.9-h0f13578_0                  --> 4.0.9-vc14_0          conda-forge [vc14]
    libxslt:         1.1.32-hf6f1972_0                 --> 1.1.32-vc14_0         conda-forge [vc14]
    openssl:         1.0.2n-h74b6da3_0                 --> 1.0.2n-vc14_0         conda-forge [vc14]
    sqlite:          3.22.0-h9d3ae62_0                 --> 3.22.0-vc14_0         conda-forge [vc14]

The following packages will be DOWNGRADED:

    bzip2:           1.0.6-hbe05fcf_4                  --> 1.0.6-vc14_1          conda-forge [vc14]
    conda:           4.4.11-py36_0                     --> 4.3.34-py36_0         conda-forge
    curl:            7.58.0-h7602738_0                 --> 7.55.1-vc14_0         conda-forge [vc14]
    icu:             58.2-ha66f8fd_1                   --> 58.2-vc14_0           conda-forge [vc14]
    libiconv:        1.15-h1df5818_7                   --> 1.14-vc14_4           conda-forge [vc14]
    libssh2:         1.8.0-hd619d38_4                  --> 1.8.0-vc14_2          conda-forge [vc14]
    libxml2:         2.9.7-h79bbb47_0                  --> 2.9.5-vc14_1          conda-forge [vc14]
    lxml:            4.1.1-py36hef2cd61_1              --> 4.1.1-py36_0          conda-forge
    lzo:             2.10-h6df0209_2                   --> 2.10-vc14_0           conda-forge [vc14]
    qt:              5.6.2-vc14h6f8c307_12             --> 5.6.2-vc14_1          conda-forge [vc14]
    tk:              8.6.7-hcb92d03_3                  --> 8.6.7-vc14_0          conda-forge [vc14]
    winpty:          0.4.3-4                           --> 0.4.3-vc14_2          conda-forge [vc14]
    yaml:            0.1.7-hc54c509_2                  --> 0.1.7-vc14_0          conda-forge [vc14]
    zlib:            1.2.11-h8395fce_2                 --> 1.2.11-vc14_0         conda-forge [vc14]

Proceed ([y]/n)? y


Downloading and Extracting Packages
libxml2 2.9.5: ############################################################################################## | 100%
conda 4.3.34: ############################################################################################### | 100%
curl 7.55.1: ################################################################################################ | 100%
openssl 1.0.2n: ############################################################################################# | 100%
yaml 0.1.7: ################################################################################################ | 100%
zlib 1.2.11: ############################################################################################### | 100%
libiconv 1.14: ############################################################################################# | 100%
freetype 2.8.1: ############################################################################################ | 100%
libpng 1.6.34: ############################################################################################# | 100%
python-lmdb 0.92: ########################################################################################## | 100%
qt 5.6.2: ################################################################################################## | 100%
libxslt 1.1.32: ############################################################################################ | 100%
winpty 0.4.3: ############################################################################################## | 100%
certifi 2018.1.18: ######################################################################################### | 100%
hdf5 1.10.1: ############################################################################################### | 100%
sqlite 3.22.0: ############################################################################################# | 100%
ca-certificates 2018.1.18: ################################################################################# | 100%
tk 8.6.7: ################################################################################################## | 100%
lxml 4.1.1: ################################################################################################ | 100%
bzip2 1.0.6: ############################################################################################### | 100%
jpeg 9b: ################################################################################################### | 100%
krb5 1.14.2: ############################################################################################### | 100%
libtiff 4.0.9: ############################################################################################# | 100%
lzo 2.10: ################################################################################################## | 100%
icu 58.2: ################################################################################################## | 100%
anaconda custom: ########################################################################################### | 100%
libssh2 1.8.0: ############################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
The batch file cannot be found.

C:\Users\Yoonghm>python
Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lmdb
>>> quit();

C:\Users\Yoonghm>conda install --name base -c conda-forge lmdb

CondaEnvironmentNotFoundError: Could not find environment: base .
You can list all discoverable environments with `conda info --envs`.


C:\Users\Yoonghm>conda info --envs
# conda environments:
#
root                  *  C:\util\Anaconda3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants