无法在python 3.7中导入Aerospike

问题描述 投票:2回答:2

我尝试使用pip下载aerospike之后将其导入,但出现此错误。我尝试使用自制软件和图形安装程序重新安装python,但结果是相同的。我可以导入其他软件包,例如numpy。

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/usr/local/lib/python3.7/site-packages/aerospike.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/lib/python3.7/site-packages/aerospike.cpython-37m-darwin.so
  Reason: image not found
python-3.x aerospike
2个回答
6
投票

Aerospike python客户端很可能由于缺少openssl依赖关系而导致导入失败。

我建议安装openssl

brew install openssl

然后重新安装python客户端。

pip install aerospike --force-reinstall

否则,您可以在此处按照OSX构建说明进行操作。 https://github.com/aerospike/aerospike-client-python/blob/master/BUILD.md#os-x

希望这会有所帮助。


0
投票

在OSX Catalina上,默认的openssl安装存在一些问题。请按照以下步骤操作。

brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

此处有更多详细信息-https://github.com/kelaberetiv/TagUI/issues/86

© www.soinside.com 2019 - 2024. All rights reserved.