stakewithus / oracle-voter

5 stars 1 forks source link

ModuleNotFoundError: No module named 'cryptography' #14

Closed atticlab closed 4 years ago

atticlab commented 4 years ago

After start i have this error: oracle_voter Traceback (most recent call last): File "/usr/local/bin/oracle_voter", line 11, in load_entry_point('oracle-voter==0.1.1a0', 'console_scripts', 'oracle_voter')() File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2793, in load_entry_point return ep.load() File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2411, in load return self.resolve() File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2417, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/local/lib/python3.7/site-packages/oracle_voter-0.1.1a0-py3.7.egg/oracle_voter/main.py", line 5, in File "/usr/local/lib/python3.7/site-packages/oracle_voter-0.1.1a0-py3.7.egg/oracle_voter/oracle/machine2.py", line 7, in ModuleNotFoundError: No module named 'cryptography'

olwee commented 4 years ago

HI there, have you tried pip install -r requirements.txt ?

atticlab commented 4 years ago

Hi.Yes. pip install -r requirements.txt Requirement already satisfied: aiohttp==3.6.2 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (3.6.2) Requirement already satisfied: aiofiles==0.4.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.4.0) Requirement already satisfied: simplejson==3.17.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (3.17.0) Requirement already satisfied: aioresponses==0.6.1 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (0.6.1) Requirement already satisfied: pytest==5.3.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (5.3.0) Requirement already satisfied: coverage==4.5.4 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (4.5.4) Requirement already satisfied: pytest-cov==2.8.1 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (2.8.1) Requirement already satisfied: bitcoinlib==0.4.11 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 8)) (0.4.11) Requirement already satisfied: bech32==1.1.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 9)) (1.1.0) Requirement already satisfied: cryptography==2.8 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 10)) (2.8) Requirement already satisfied: multidict<5.0,>=4.5 in ./venv/lib/python3.7/site-packages (from aiohttp==3.6.2->-r requirements.txt (line 1)) (4.7.1) Requirement already satisfied: async-timeout<4.0,>=3.0 in ./venv/lib/python3.7/site-packages (from aiohttp==3.6.2->-r requirements.txt (line 1)) (3.0.1) Requirement already satisfied: yarl<2.0,>=1.0 in ./venv/lib/python3.7/site-packages (from aiohttp==3.6.2->-r requirements.txt (line 1)) (1.4.2) Requirement already satisfied: attrs>=17.3.0 in ./venv/lib/python3.7/site-packages (from aiohttp==3.6.2->-r requirements.txt (line 1)) (19.3.0) Requirement already satisfied: chardet<4.0,>=2.0 in ./venv/lib/python3.7/site-packages (from aiohttp==3.6.2->-r requirements.txt (line 1)) (3.0.4) Requirement already satisfied: more-itertools>=4.0.0 in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (8.0.2) Requirement already satisfied: pluggy<1.0,>=0.12 in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (0.13.1) Requirement already satisfied: wcwidth in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (0.1.7) Requirement already satisfied: py>=1.5.0 in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (1.8.0) Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (1.3.0) Requirement already satisfied: packaging in ./venv/lib/python3.7/site-packages (from pytest==5.3.0->-r requirements.txt (line 5)) (19.2) Requirement already satisfied: fastecdsa>=1.7.1; platform_system != "Windows" in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (1.7.5) Requirement already satisfied: requests>=2.20.0 in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (2.22.0) Requirement already satisfied: six>=1.10 in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (1.13.0) Requirement already satisfied: pyaes==1.6.1 in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (1.6.1) Requirement already satisfied: scrypt>=0.8.13 in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (0.8.13) Requirement already satisfied: SQLAlchemy>=1.3.2 in ./venv/lib/python3.7/site-packages (from bitcoinlib==0.4.11->-r requirements.txt (line 8)) (1.3.11) Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./venv/lib/python3.7/site-packages (from cryptography==2.8->-r requirements.txt (line 10)) (1.13.2) Requirement already satisfied: idna>=2.0 in ./venv/lib/python3.7/site-packages (from yarl<2.0,>=1.0->aiohttp==3.6.2->-r requirements.txt (line 1)) (2.8) Requirement already satisfied: zipp>=0.5 in ./venv/lib/python3.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->pytest==5.3.0->-r requirements.txt (line 5)) (0.6.0) Requirement already satisfied: pyparsing>=2.0.2 in ./venv/lib/python3.7/site-packages (from packaging->pytest==5.3.0->-r requirements.txt (line 5)) (2.4.5) Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.7/site-packages (from requests>=2.20.0->bitcoinlib==0.4.11->-r requirements.txt (line 8)) (2019.11.28) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./venv/lib/python3.7/site-packages (from requests>=2.20.0->bitcoinlib==0.4.11->-r requirements.txt (line 8)) (1.25.7) Requirement already satisfied: pycparser in ./venv/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography==2.8->-r requirements.txt (line 10)) (2.19)

olwee commented 4 years ago

What OS are you using? Ubuntu, Debian, MacOS?

Cryptography requires OpenSSL Backend, you may need to install that for your system

joe-bowman commented 4 years ago

@atticlab The paths are the clue above; the dependencies were installed under a virtual environment, but you're not running the application from the virtual environment (else the paths in the stacktrace would refer to ./venv/lib/python3.7/site-packages)