171129-workaround on ubuntu-seting up piston for steem

setup ubuntu environment variables

sudo vi /etc/environment

Then set all below variables:
percentChanceToPost
numPostsToConsider
voteWeight
steemPostingKey
steemAccountName

error encounter while installing Steem packages

error message:

ImportError: module 'setuptools.dist' has no attribute 'check_specifier'

Update setup tools by

sudo pip3 install --upgrade pip

Then another error pops up:

FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/lib/python3.6/site-packages/funcy-1.10-py3.6.egg'

While reinstalling funcy found these two messages

Requirement already satisfied: funcy in ./.local/lib/python3.6/site-packages
Requirement already satisfied: funcy in /home/ubuntu/.local/lib/python3.6/site-packages

But I couldn't find any files like 'funcy-1.10-py3.6.egg' in both path.

Also from File List in archlinux(https://www.archlinux.org/packages/community/any/python-funcy/files/)
I can see the egg package there, so why I don't have it?

Try I tried manually installation:

cd ~
git clone https://github.com/Suor/funcy
cd funcy
sudo python3 setup.py install --user

Done!

from piston.steem import Steem

got errors:

Traceback (most recent call last):
File "", line 1, in
File "piston/init.py", line 1, in
from .steem import Steem
File "piston/steem.py", line 1537
def delegate_vesting_shares(self, to_account: str, vesting_shares: str, account=None):
^
SyntaxError: invalid syntax

reinstall piston-lib no errors but above message remains

Try to do Upgrade via

pip3 install steem --user --upgrade

Then errors:

Traceback (most recent call last):
File "", line 1, in
ImportError: No module named piston.steem

Then I enter python by using "python3" instead of "python", Problem solved.

Conclusion: while python 2.7 and python 3 exists in the same server. I need a better solution for conflicts between the two version of python.

seting environment variables

Problem: After adding variables in /etc/environment, cannot load related value from command "os.environ.get('percentChanceToPost')"

Then I have to add new variable like

percentChanceToPost="5"

Moreover, I have to log out and login again to make the env file valid.

Done.

转载于:https://www.cnblogs.com/jc53/p/7921821.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值