#python #blockchain #modulenotfounderror #elrond #erdpy
Вопрос:
Когда я пытаюсь установить erdpy
, происходит сбой со следующим сообщением:
ModuleNotFoundError: Нет модуля с именем «ledgercomm»
КРИТИЧНО:установщик:Не удалось установить erdpy.
Отсюда я следую инструкциям.
Выполняется:
$ wget -O erdpy-up.py https://raw.githubusercontent.com/ElrondNetwork/elrond-sdk-erdpy/master/erdpy-up.py
выходы:
--2021-09-25 11:04:20-- https://raw.githubusercontent.com/ElrondNetwork/elrond-sdk-erdpy/master/erdpy-up.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8902 (8.7K) [text/plain]
Saving to: ‘erdpy-up.py’
erdpy-up.py 100%[=============================================================>] 8.69K --.-KB/s in 0.003s
2021-09-25 11:04:20 (2.82 MB/s) - ‘erdpy-up.py’ saved [8902/8902]
Затем, бегом:
$ python3 erdpy-up.py
выходы:
INFO:installer:Checking user.
INFO:installer:Checking Python version.
INFO:installer:Python version: sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0)
INFO:installer:Checking operating system.
INFO:installer:Operating system: linux
INFO:installer:Removed previous installation (virtual environment).
INFO:installer:Packages found: <module 'ensurepip' from '/usr/lib/python3.6/ensurepip/__init__.py'>, <module 'venv' from '/usr/lib/python3.6/venv/__init__.py'>.
INFO:installer:Creating virtual environment in: /home/user/elrondsdk/erdpy-venv.
INFO:installer:Virtual environment has been created in: /home/user/elrondsdk/erdpy-venv.
INFO:installer:Installing erdpy in virtual environment...
Collecting pip
Using cached https://files.pythonhosted.org/packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2.4-py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-21.2.4
Collecting erdpy
Downloading erdpy-1.0.17-py3-none-any.whl (142 kB)
|################################| 142 kB 1.6 MB/s
Downloading erdpy-1.0.16-py3-none-any.whl (142 kB)
|################################| 142 kB 5.1 MB/s
Collecting bottle
Downloading bottle-0.12.19-py3-none-any.whl (89 kB)
|################################| 89 kB 4.5 MB/s
Collecting pycryptodomex
Downloading pycryptodomex-3.10.4-cp35-abi3-manylinux2010_x86_64.whl (1.9 MB)
|################################| 1.9 MB 5.4 MB/s
Collecting pynacl
Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
|################################| 961 kB 4.7 MB/s
Collecting requests
Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
|################################| 62 kB 6.8 MB/s
Collecting prettytable
Downloading prettytable-2.2.0-py3-none-any.whl (23 kB)
Collecting toml>=0.10.2
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting cryptography>=3.2
Downloading cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl (3.0 MB)
|################################| 3.0 MB 5.5 MB/s
Collecting cffi>=1.12
Downloading cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl (401 kB)
|################################| 401 kB 6.1 MB/s
Collecting pycparser
Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
|################################| 112 kB 6.9 MB/s
Collecting importlib-metadata
Downloading importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting wcwidth
Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting zipp>=0.5
Downloading zipp-3.5.0-py3-none-any.whl (5.7 kB)
Collecting typing-extensions>=3.6.4
Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting idna<4,>=2.5
Downloading idna-3.2-py3-none-any.whl (59 kB)
|################################| 59 kB 8.6 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
|################################| 145 kB 6.5 MB/s
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.6-py3-none-any.whl (37 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
|################################| 138 kB 5.6 MB/s
Installing collected packages: zipp, typing-extensions, pycparser, wcwidth, urllib3, six, importlib-metadata, idna, charset-normalizer, cffi, certifi, toml, requests, pynacl, pycryptodomex, prettytable, cryptography, bottle, erdpy
Successfully installed bottle-0.12.19 certifi-2021.5.30 cffi-1.14.6 charset-normalizer-2.0.6 cryptography-3.4.8 erdpy-1.0.16 idna-3.2 importlib-metadata-4.8.1 prettytable-2.2.0 pycparser-2.20 pycryptodomex-3.10.4 pynacl-1.4.0 requests-2.26.0 six-1.16.0 toml-0.10.2 typing-extensions-3.10.0.2 urllib3-1.26.7 wcwidth-0.2.5 zipp-3.5.0
Traceback (most recent call last):
File "/home/user/elrondsdk/erdpy-venv/bin/erdpy", line 5, in <module>
from erdpy.cli import main
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/cli.py", line 7, in <module>
import erdpy.cli_accounts
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/cli_accounts.py", line 4, in <module>
from erdpy import cli_shared, utils
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/cli_shared.py", line 8, in <module>
from erdpy import config, errors, scope, utils
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/scope.py", line 6, in <module>
from erdpy.testnet.config import TestnetConfiguration
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/testnet/__init__.py", line 2, in <module>
from erdpy.testnet.setup import clean, configure, install_dependencies
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/testnet/setup.py", line 8, in <module>
from erdpy.testnet import (genesis_json, genesis_smart_contracts_json,
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/testnet/genesis_json.py", line 6, in <module>
from erdpy.testnet.genesis import (get_delegation_address,
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/testnet/genesis.py", line 2, in <module>
from erdpy.contracts import SmartContract
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/contracts.py", line 10, in <module>
from erdpy.transactions import Transaction
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/transactions.py", line 11, in <module>
from erdpy.ledger.ledger_app_handler import SIGN_USING_HASH_VERSION
File "/home/user/elrondsdk/erdpy-venv/lib/python3.6/site-packages/erdpy/ledger/ledger_app_handler.py", line 1, in <module>
from ledgercomm import Transport
ModuleNotFoundError: No module named 'ledgercomm'
CRITICAL:installer:Could not install erdpy.
Подробные сведения:
$ python3 --version
Python 3.6.9
Как я могу это исправить?
Ответ №1:
Пожалуйста, не забудьте обновить свою установку python.
Для пакета ledgercomm требуется как минимум python 3.8, как видно на сайте пакета.
В противном случае он не может быть установлен и приведет к ошибке, с которой вы столкнулись.