到目前为止我已经尝试过,安装在 ubuntu 软件包之后。
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
sudo apt install build-essential automake pkg-config libtool libffi-dev
libgmp-dev
sudo apt install libsecp256k1-dev
sudo apt-get install python3.6-dev
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD
sudo add-apt-repository 'deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe'
sudo apt update
sudo apt-get install sawtooth python3-sawtooth-sdk
sudo apt-get install python3-sawtooth-rest-api
然后在virtualenv中,我已经安装了pipenv install sawtooth-sdk pipenv install sawtooth_rest_api 收集sawtooth_rest_api
Error: An error occurred while installing sawtooth_rest_api!
Could not find a version that satisfies the requirement sawtooth_rest_api (from versions: )
No matching distribution found for sawtooth_rest_api
注意:我正在尝试使用锯齿市场,在这个存储库中,他们直接连接到验证器,而不是提交批处理到 rest api。
from sawtooth_rest_api.messaging import Connection
app.config.VAL_CONN = Connection(app.config.VALIDATOR_URL)
将 python3-sawtooth-sdk 安装为 python 包后,无法在 python 中导入 sawtoth-rest-api 以使锯齿市场工作。