Skip to content

Instantly share code, notes, and snippets.

@namuyan
Last active March 12, 2020 02:07
Show Gist options
  • Save namuyan/1a8aef3482fa17c6b206ff028efc9807 to your computer and use it in GitHub Desktop.
Save namuyan/1a8aef3482fa17c6b206ff028efc9807 to your computer and use it in GitHub Desktop.
How to install plyvel on wondows

How to install plyvel on wondows

I use winodws10 64bit, so target is x86_64

Build Leveldb

Build plyvel

extra_compile_args = ['-Wall', '-g', '-x', 'c++', '-std=c++11', '-DMS_WIN64']

ext_modules = [
    Extension(
        'plyvel._plyvel',
        language='c++',
        include_dirs=['include'],
        library_dirs=['include'],
        sources=['plyvel/_plyvel.pyx', 'plyvel/comparator.cpp'],
        libraries=['leveldb'],
        extra_compile_args=extra_compile_args,
    )
]
  • open MSYS2 terminal and execute: "path\to\python.exe" setup.py bdist_wheel
  • check wheel file in dist folder

Install plyvel

  • install by wheel
  • pip install plyvel-1.0.5-cp36-cp36m-win_amd64.whl

Other docs

@bwanaaa
Copy link

bwanaaa commented Mar 12, 2020

Thank you for writing this up. However I am having a little problem. I navigate to the build folder and execute
"C:\Program Files\CMake\bin\cmake.exe" -G "MSYS Makefiles" ..
But I get the following error

CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!

msys is installed in the C drive
cmake is installed
msys directory is in PATH

Help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment