python环境下的steem库安装

in #cn5 years ago

本来以为很简单的pip就行了,才发现自己太年轻了,折腾了好几个小时都没成功,因为喜欢用python,库多扩展性好,但win系统上面的兼容就很多bug了。
mobile-phone-1513945_960_720.jpg

首先惯性输入pip install steem-python
报错:

 ERROR: Failed building wheel for ujson

分析安装steem-python需要依赖ujson,而自动下载的ujson库无法解析
故手动到https://www.lfd.uci.edu/~gohlke/pythonlibs/#ujson 下在编译好的whl文件,我的是win32系统,python3.6,可根据自己的系统下载对应的
微信截图_20191104121534.png

下载好后pip install E:/ujson-1.35-cp36-cp36m-win32.whl
提示安装成功,再次输入pip install steem-python

依然报错,这次又是另外一个依赖库pycrypto的错误

 ERROR: Failed building wheel for pycrypto

这个库安装的时候就吃来不少苦了,因为找不到编译好的库,去官网只更新到了python3.4版本的,翻遍了各大搜索引擎要么版本低,要么系统不对
放弃的时候试了一下笨办法,直接把下在的64位系统的pycrypto-2.6.1-cp36-none-win64.whl的名称改成pycrypto-2.6.1-cp36-none-win32.whl
然后再试了一下,居然成功了,,,这懵的

心情瞬间开心,再次pip install steem-python
安装成功,大功告成了吧!
来试一下看看账户吧

微信截图_20191104123110.png

报错cannot import name '_AES',什么鬼
算了,今天先这样吧,花了太多的时间了,只能说steem的python库还相当的不成熟,慢慢优化吧。

Sort:  

欢迎你加入steemJS的行列!

Windows 是吧,python在Windows是的支持不好
@tipu curate

Posted using Partiko iOS

是啊,安装个冷门的库时候就错误不断,其实要有空的话,自己按照api写的比这个稳定

Congratulations @taibai! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 100 upvotes. Your next target is to reach 250 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest⁴ - Meet the Steemians Contest
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.16
JST 0.030
BTC 80986.05
ETH 3142.29
USDT 1.00
SBD 2.74