This is meant as the first part to a series of tutorials.
The goal is to produce a hands-on guide for people who want to jump straight into developing tools for STEEM.
In this part, I will try to guide you through the process of installing beem.
beem is a Python library for STEEM and is based on steem-python, which is based on piston-lib.
While steem-python is the official lib, I chose beem, because it is updated more frequently. ( At this time, the last update to steem-python is 9 months old)
While it is possible to install Python and beem on Windows, I will start by setting up a virtual machine, which I will install Linux on.
In my opinion, this has multiple benefits, the main one being that it will encapsulate your development environment; Whatever abomination you code up, it will not be able to wreck your main operating system - In the worst case, you can stop the virtual machine and start it again.
I believe this method to be the easiest for most people.
If you want to install beem on a different system, this is not the right guide for you. If you can figure it out on your own, you can jump a chapter ahead.
There is a free version of VMware, which is ideal for our purposes:
https://www.vmware.com/products/workstation-player.html
Make sure to download the Workstation Player, as only that is free to use.
Install this, make sure to uncheck the regular updates nonsense.
I will go with Ubuntu 18.04.3 LTS, as that seems to be the most popular choice at the moment.
https://ubuntu.com/download/desktop
Open VMware, create a new virtual machine using a Ubuntu 18.04.3 LTS image.
If you are new to Linux - don't panic ! I don't get it either.
Before doing anything, remove Amazon from you 'Favourites' menu.
If your keyboard layout is not English, you need to go to 'Region and Languages' and add a new keyboard layout, which makes no sense, and is very confusing.
ctrl+alt+t opens a new terminal.sudo apt-get updateNote:
ctrl+c, ctrl+v do not work like they do in Windows.
This is just to confuse everybody.
sudo apt-get install build-essential libssl-dev python-devsudo apt install python3-pipsudo pip3 install beemThe easiest way to test, if it went right, is to:
beempy --help
beempy is a wallet that is built on beem.
If you see a list of help topics, you have successfully set up beem.
To test your first own script, create a new file:
gedit beemtest.py
This will open a text editor.
from beem.blockchain import Blockchain
blockchain = Blockchain()
print(blockchain.get_current_block_num())
paste the above 3 lines of code and save the file.
python3 beemtest.py
This will execute your script and should print the current head-block number on your screen.
If it did not work as intended, comment below.
I hope @flipstar gets to test this.
Also mentioning @revisesociology for good measure.