MMoSP001E- install steem python with anaconda

avatar

MMoSP001E- install steem python with anaconda

中文版本:MMoSP001C- Anaconda 安装 steem-python 开发环境

steem-python :It is the official Python Library of Steem, which has a bip38 encrypted wallet and a practical cli utility named 'steempy'.

'steem-python' requires Python3.5+. Here, anaconda is used to install it and provide cross platform management of Python development environment. This allows Windows developers and Linux / Mac OS developers to devote themselves to similar coding operations.

MacOS10.14 install Anaconda3-2019.10

Official address:https://repo.anaconda.com/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
If the official download is slow, you can use the image of Tsinghua University:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.10-MacOSX-x86_64.sh

$ cd ~
$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
$ bash Anaconda3-2019.10-MacOSX-x86_64.sh
$ source ~/.bash_profile
(base) ~$ python -V
(base) ~$ pip -V

ubuntu18.04 install Anaconda3-2019.10

Official address:https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
If the official download is slow, you can use the image of Tsinghua University:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.10-Linux-x86_64.sh

$ cd ~
$ sudo apt-get remove python3 python3-dev python3-pip
$ sudo apt-get install libffi-dev libssl-dev make
$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
$ sh ./Anaconda3-2019.10-Linux-x86_64.sh
$ source ~/.bashrc
(base) ~$ python -V
(base) ~$ pip -V 

Anaconda3 install steem-python

The default installation mode of anaconda3 will automatically enter the python development environment of anaconda3 after the user logs in.

If there is no default anaconda3 environment, you can manually enter the anaconda3 environment:(base) ~$ conda activate
Quit Anaconda3 environment:(base) ~$ conda deactivate

$ cd ~
$ conda activate
(base) ~$ conda config --add channels conda-forge
(base) ~$ conda install cryptography
(base) ~$ git clone https://github.com/steemit/steem-python
(base) ~$ cd steem-python
(base) ~$ make install

Note: package installation (pip install steem) is error frequently

Using the cli tool 'steempy'

help:steempy --help
set API node:(base) ~$ steempy set nodes https://anyx.io,https://api.steemit.com
create wallet password:$ steempy changewalletpassphrase
add steem account key:$ steempy addkey
list accounts in wallet:$ steempy listaccounts

+-----------+---------+-----------------------------------+
| Name | Type | Available Key |
+-----------+---------+-----------------------------------+
| ddxxxxnk | active | STMxxxxxx9yyE |
| ddnbbbbnk | posting | STM87YzixbssssEyyfU |
+-----------+---------+-----------------------------------+

set wallet default account:$ steempy set default_account testdappcoder
set steem vote weight:$ steempy set default_vote_weight 88
list config:$ steempy config

----------------------------------------------+
| Key | Value |
+---------------------+-------------------------+
| nodes | https://anyx.io,https://api.steemit.com |
| default_account | testdappcoder |
| default_vote_weight | 88 |
+---------------------+-------------------+

Demo a robot to scan the latest voting data(print_live_votes.py):

from steem.blockchain import Blockchain
from steem.post import Post

blockchain = Blockchain()
stream = map(Post, blockchain.stream(filter_by=['vote']))
for vote in stream:
    print('vote:',vote)

Run it:python print_live_votes.py
Results consistent with expectations:
bfibnr.png

English list:

MMoSP000E-< make money on steem-python > Preface

中文列表

#cn #hive-180932 #chinese #hive-143316
MMoSP000C-《steem-python赚钱实战教程》序言
MMoSP001C- Anaconda 安装 steem-python 开发环境



0
0
0.000
3 comments
avatar

According to the Bible, In Matthew 17: 1-5, was Matthew in the mountain with Jesus?

(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)



Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.
Check our Discord Chat
Join our Official Community: https://beta.steemit.com/trending/hive-182074

0
0
0.000