How to install Steem-Python

By @themarkymark1/24/2018programming

What is Steem-python

Steem-python is a python framework build by the legendary @furion which has been adopted as the official python framework for Steem.

You can find the project on Git Hub.

Many bots and services use Steem-python to communicate with the Steem blockchain. The other popular library is SteemJS for Javascript.

Installing Python

To use Steem-python you need to have python installed. Most distributions have their own installation of python and it is highly likely it is already installed. I do not recommend using the default version of python and install a localized version of python that has better support and better tools.

We are going to install Anaconda which is the python distribution that is used by most data scientists and machine learning developers. Unless you are also doing machine learning, I would recommend using miniconda as it only installs a minimum amount of modules.

You can find the latest version of mini conda on their website.

At this time, the latest 64 bit Linux version is: Miniconda3-latest-Linux-x86_64.sh

Download miniconda

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh

Set execute permissions

chmod +x Miniconda3-latest-Linux-x86_64.sh

Run installation

./Miniconda3-latest-Linux-x86_64.sh

During the installation, you will be asked to approve the license, the location, and if you want to update your bash profile script. The last question asking to update your bash profile is set to no, I recommend specifying yes so that the path to the binaries are updated in your bash profile.

Once the installation is finished, log out of SSH and log back in to update your path variable.

Install dependencies

sudo apt install libffi-dev libssl-dev

Install Steem-python

The official steem-python distribution isn't updated very often and I recommend installing @furion's version of Steem-python. In fact the official version of Steem-python is originally @furion's work.

python3 -m pip install -U git+git://github.com/Netherdrake/steem-python

Optional (Install bPython)

bpython is a replacement for the python interactive console. It has syntax highlighting and some additional features like code intelligence. It is really helpful when working interactively with Python.

python3 -m pip install -U bpython

Test installation

If you installed bpython

bpython

If not

python

Enter the following program:

from steem import Steem
steem = Steem()
steem.get_account('ned')

If you see JSON returned, you are good to go!

themarkymark.png


My recent popular posts

![](https://steemitimages.com/DQmPkQhAQceC7aHr4Gy5GKv7LMoiy47P7PyaNCeZBHMpFke/white-bg-with-drop-shadow.gif)

173

comments