在Ubuntu 16上配置Python和Steem开发环境

in #cn8 years ago

安装Python 3

在Ubuntu 16中Python 2和Python 3都是已经默认安装了,只需要更新一下系统,确保升级到最新版本:

sudo apt-get update
sudo apt-get -y upgrade

验证一下Python版本

python -v

还需要安装Python中的组件管理工具pip:

sudo apt-get install -y python3-pip

安装基本的软件开发包:

sudo apt-get install build-essential libffi-dev libssl-dev python3-dev 

设定虚拟运行环境

sudo apt-get install python3-venv
mkdir environments
cd environments
python3 -m venv myenv
source myenv/bin/activate

安装进行Steem开发需要的软件库

pip3 install wheel 
pip3 install piston-lib
pip3 install steem 

测试一下

下面写了一段小程序,实时输出最新发表文章采用的标签:

from piston import Steem
steem = Steem()
for c in steem.stream_comments():
  if c.is_main_post():
    print (c.meta["tags"])

https://steemit.com 首发。非常感谢阅读,欢迎FOLLOW和Upvote @yuxi 激励我创作更多更好的内容。

Sort:  

谢谢,一起努力

Congratulations @yuxi! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received
Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

What does this?

Congratulations @yuxi! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

最近好好读了你这一系列文章,受益匪浅,多谢!奇怪为什么这几个帖子收益这么少。

谢谢,可能我的粉丝太少了,另外种种事太多没法和大家多沟通交流吧

Coin Marketplace

STEEM 0.09
TRX 0.31
JST 0.033
BTC 110045.53
ETH 3881.23
USDT 1.00
SBD 0.58