当前位置: 首页 > 工具软件 > Piston > 使用案例 >

171129-workaround on ubuntu-seting up piston for steem

钱稳
2023-12-01

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

 类似资料:

相关阅读

相关文章

相关问答