微慑信息网

python下使用leveldb

对应模块:

https://github.com/happynear/py-leveldb-windows 访问地址 往下拉 找到对应位置

 


py-leveldb-windows

用于构建 leveldb python 包装器的 Visual Studio 项目

预构建的二进制文件

Python2.7:谷歌驱动百度云

Python3.6:谷歌驱动百度云

放入leveldb.pyd文件夹YOUR_PYTHON_ROOT/Lib/site-packages

运行python ./test-py-leveldb.py(python2) 或python ./test-py3-leveldb.py(python3)。如果一切正常,您将收到hello world响应和一个名为db.

用法

  1. 将编译模式更改为 Release X64。

  2. 修改设置中的python路径(Additional Include Directories、Additional Library Directories、Additional Dependencies)。

  3. 编译

  4. 复制./x64/Release/leveldb.pydYOUR_PYTHON_ROOT/Lib/site-packages.

  5. 运行python ./test-py-leveldb.py。如果一切正常,您将收到hello world响应和一个名为db.

使用 Python3 编译

  1. 更改设置中的 python 路径(附加包含目录、附加库目录、附加依赖项)。

  2. 使用此版本leveldb.def替换/win32_impl_src/leveldb.defhttps ://github.com/happynear/py-leveldb-windows/blob/5fa0361a46ef0a75123ea785bdb15af1b2e64600/win32_impl_src/leveldb.def 。

 


测试 :

本文标题:python下使用leveldb
本文链接:
(转载请附上本文链接)
https://vulsee.com/archives/vulsee_2022/0613_16412.html
转载请附本站链接,未经允许不得转载,,谢谢:微慑信息网-VulSee.com » python下使用leveldb
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

微慑信息网 专注工匠精神

访问我们联系我们