0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

plyvelをmacにインストールしようとしたらエラーが出た話

0
Last updated at Posted at 2019-04-29

5/7追記
pipにあるplyvelのversionが1.1.0に更新されていました。
現在はpip install plyvelでエラー無しでインストールできるようになっています。

はじめに

LevelDBをpythonから叩くためのパッケージ"plyvel"をpipでmacにインストールしようとしたところ、エラーが発生しました。
どうやらLevelDBのバージョンをを1.2.1に上げたのが原因のようです。plyvel1.0.6で修正されるようですが...。

環境

  • macOS Mojave
  • Python 3.7.3
  • LevelDB 1.2.1
  • plyvel 1.0.5

インストール手順

ということで、ソースコードからコンパイル。

git clone https://github.com/wbolster/plyvel.git

としてgitからコードをcloneしたあと、中にあるsetup.pyを開き、16行目に'-stdlib=libc++'を追記します。

setup.py
# 16行目にフラグを追記
extra_compile_args = ['-Wall', '-g', '-x', 'c++', '-std=c++11', '-stdlib=libc++']

あとは

make
python setup.py install

でインストール完了です。お疲れ様でした。

参考文献

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?