installing steem-python under windows 10

in #tutorials7 years ago

Today I just wanted to install steem-python on Windows 10 for a few tests on the weekend. However, from this 'only times briefly' were quickly a few hours.

steem-python.png

After a look at the installation guide to steem-python, I had to realize that my installed Python version 2.7 was too old.
Since I had not installed Python IDE so far, my first step was installing Python 3.5 and the Python IDE PyCharm from JetBrains.

After the installation, it should be easy to install steem-python using pip. But far from it, it was not that easy. There was an error message after a short time.

python.exe -m pip install steem
...
error: command 'cl.exe' failed: No such file or directory

After a short search, I found out that the program cl.exe is the C / C ++ compiler of Microsoft.

Since I had only installed C # in the Visualstudio so far, I had to install C ++ still after.
For this I simply clicked the workload 'Desktop Development with C ++' in the Visual Studio installer. This was the reason that a further 2.64GB had to be installed.
So I had to wait a while, until everything was down-loaded and installed.


So, next try:

c:\Program Files\Python35>python.exe -m pip install steem
...
Successfully installed pycrypto-2.6.1 steem-0.18.9 ujson-1.35

Better directly an upgrade:

c:\Program Files\Python35>python.exe -m pip install -U steem
...
Successfully installed requests-2.18.1 ruamel.yaml-0.15.7

Then I started python.exe and entered the first command from the Quick Start tutorial.
And Zack, there was the next problem:

>>> from steem import Steem

  File "c:\Program Files\Python35\lib\site-packages\Crypto\Random\OSRNG\nt.py", line 28, in <module>
    import winrandom
ImportError: No module named 'winrandom'


So the file nt.py opened in the editor, and changed the line

import winrandom

into

from . import winrandom

and saved the file.

Then python started again and continued with the Quick Start instructions:

>>> from steem import Steem
>>> s = Steem()

Juchu, so far no mistake.

As the first test I asked the number of accounts created:

>>> s.get_account_count()
196824
>>>

Oh, almost 200000 accounts.

And now I can finally go to bed, because I have prepared for my tests on the weekend everything.

Sort:  

well done cryptoriddler!

thanks

Very interesting - does this allow you to perform operations on the Steem blockchain using Python? Sounds pretty cool since I've only used Python for web app development (Flask) and data analysis (Jupyter notebooks)

Yeah, I hope so. Will try to find out, whats possible this weekend.

Great information share. 👍

Coin Marketplace

STEEM 0.19
TRX 0.18
JST 0.032
BTC 87663.71
ETH 3042.50
USDT 1.00
SBD 2.75