Steem-python installation on Linux

Steem-python installation on Linux

After the failed attempt in installing steem-python in Windows. I decided not to waste more time on solving the problems and move on to a Ubuntu virtual machine which is practically a more friendly environment for such work.

Install VM and set up Python environment via Anaconda

Anaconda is the recommended python environment by the official document. After installing Ubuntu in Virutalbox which is quite straight-forward, I proceeded with the git clone method instead of the pip as the former would be getting the source code from official github repository.

sudo apt install git
git clone https://github.com/steemit/steem-python
cd steem-python
sudo make install

Errors in the installation

Here are the common errors the installation will hit under Linux environment and already being reported by many users.

scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: openssl/aes.h: No such file or directory
#include <openssl/aes.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:18: recipe for target 'install' failed
make: *** [install] Error 1

Traceback (most recent call last):
  File "/usr/local/bin/steempy", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'scrypt>=0.8.0' distribution was not found and is required by steem

This is mainly due to the Ubuntu system was not able to find the scrypt package which can be easily fixed by

sudo apt-get install libssl-dev

Or as suggested by the official doc

brew install openssl
export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS"
export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"

Test and done

Use python to enter pyton prompt mode and test with the simple get_account function and it works.

VirtualBox_2018-09-30_09-07-20.png

Test with steempy which is a practical CLI utility for Steem and it should be working without errors too.

VirtualBox_2018-09-30_09-11-11.png


Posted from my blog with SteemPress : https://fr3eze.vornix.blog/steem-python-installation-on-linux/


This page is synchronized from the post: ‘Steem-python installation on Linux’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×