HIVE上使用steem-python的一些尝试 (上)
因为我的一些脚本是用steem-python写的,所以让这些脚本已最简单的方式迁移到HIVE上,就是把steem-python库弄到HIVE上来。
(图源 :pixabay)
我看@pharesim 已经对这个库进行了迁移,所以首先打算直接用这个
hive-python。
尝试安装 hivepy 失败
hive-python github地址为:
https://github.com/pharesim/hive-python
按着github上的说明,首先尝试直接用pip安装:
pip install hivepy
出现N多类似如下错误:
src/scrypt.c:28:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
应该是没装python支持的缘故,装上:
sudo apt-get install python3-dev
重新执行pip install hivepy,又出现N多类似如下错误:
scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: openssl/aes.h: No such file or directory
#include <openssl/aes.h>
^~~~~~~~~~~~~~~
compilation terminated.
应该是没装openssl支持的缘故,装上:
sudo apt install libssl-dev
貌似安装成功了,运行一下命令行:
hivepy
擦,这是什么鬼,为啥提示找不到hive呢?
试试这个:
pip install hive
我感觉有些方,这些东西都是我不认识的啊:
装完之后再次执行:
hivepy
难道我误打误撞成功了?心里有点没有底。
执行一下这个命令:
hivepy info
果然出错了:
再试试代码方式安装,错误依旧:
git clone https://github.com/pharesim/hive-python.git
cd hive-python
python3 setup.py install # python setup.py install for 2.7
找到一个人家的hive库,https://pypi.org/project/hive/,不知道是干啥的,不过看看人家最后更新日期:Released: Jul 26, 2011,可用判断此hive非彼hive,我用pip install hive铁定不对了。
(图源 :pixabay)
看来用hivepy我试搞不定了,本来想找人求救,但是大家都很忙,还是我自己探索吧,还好后来终于使用steem-python搞定,我在下一篇文章中总结吧。
相关链接
Leave HIVE上使用steem-python的一些尝试 (上) to:
Read more #cn posts
Best Posts From oflyhigh
We have not curated any of oflyhigh's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.