___|  _ \   |  |    |   |_ _|\ \     / ____|
 |     |   |  |  |    |   |  |  \ \   /  __|
 |   | |   | ___ __|  ___ |  |   \ \ /   |
\____|\___/     _|   _|  _|___|   \_/   _____| 

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

Installing Python 3.6 on Ubuntu 16.04

BY: @fortunex | CREATED: Feb. 11, 2018, 2:32 a.m. | VOTES: 2 | PAYOUT: $0.06 | [ VOTE ]
  1. install add-apt-repository

apt-get install software-properties-common

  1. now add repository for Python 3.6

sudo add-apt-repository ppa:jonathonf/python-3.6

sudo apt-get update
sudo apt-get install python3.6 libpython3.6-dev
apt remove python2.7

rm /usr/bin/python3
ln -s /usr/bin/python3.6 /usr/bin/python3

  1. pip

apt install python3-pip

4.

python3 -m pip install -U pip setuptools

  1. Say Steem

error:

src/scrypt.c:27:20: fatal error: Python.h: No such file or directory

This can be avoided by

apt-get install libpython3.6-dev

  1. Installing steem libraries etc

python3 -m pip install -U pip setuptools steem numpy

TAGS: [ #howto ]

Replies

@bobinson | Feb. 24, 2018, 4:40 p.m. | Votes: 0 | [ VOTE ]

pip3 install -U setuptools

if setuptools are not found or needs upgrade

@bobinson | March 3, 2018, 6:40 a.m. | Votes: 1 | [ VOTE ]

toml related errors causes the following errors:

  • . scripts using steem-python will give the following error:
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /
  • . steempy will give the following error:
Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/steempy", line 7, in 
    steem.cli.legacy()
  File "/usr/local/lib/python3.6/dist-packages/steem/cli.py", line 83, in legacy
    version=pkg_resources.require("steem")[0].version
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 984, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 875, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (toml 0.9.3 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('toml==0.9.3.1'), {'steem'})

how to fix ?

edit /usr/local/lib/python3.6/dist-packages/steem-0.18.103.dist-info/METADATA and change

*toml (==0.9.3.1)*

to

*toml (==0.9.3)*

to test, do the following

steempy set nodes https://steemd.privex.io

and run

steempy

@bobinson | March 9, 2018, 6:41 p.m. | Votes: 0 | [ VOTE ]

apt -y install software-properties-common
pip3 install -U setuptools
add-apt-repository -y ppa:jonathonf/python-3.6
apt update ; apt -y install python3.6 libpython3.6-dev python3-pip
rm -f /usr/bin/python3 ; ln -s /usr/bin/python3.6 /usr/bin/python3
pip3 install -U setuptools
python3 -m pip install -U pip steem numpy
vim /usr/local/lib/python3.6/dist-packages/steem-0.18.103.dist-info/METADATA

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>