[ethereum_ropsten] ModuleNotFoundError: No module named 'rlp'

I am trying to issue certificate in ethereum ropsten testnet. But I am facing error-

(venv) bash-4.3# pwd
/cert-issuer
(venv) bash-4.3# cert-issuer -c conf_ethtest.ini
WARNING - Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - This run will try to issue on the ethereum_ropsten chain
Traceback (most recent call last):
File “/usr/bin/cert-issuer”, line 33, in
sys.exit(load_entry_point(‘cert-issuer==2.0.25’, ‘console_scripts’, ‘cert-issuer’)())
File “/usr/lib/python3.6/site-packages/cert_issuer/main.py”, line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
File “/usr/lib/python3.6/site-packages/cert_issuer/issue_certificates.py”, line 31, in main
from cert_issuer.blockchain_handlers import ethereum
File “/usr/lib/python3.6/site-packages/cert_issuer/blockchain_handlers/ethereum/init.py”, line 9, in
from cert_issuer.blockchain_handlers.ethereum.signer import EthereumSigner
File “/usr/lib/python3.6/site-packages/cert_issuer/blockchain_handlers/ethereum/signer.py”, line 1, in
import rlp
ModuleNotFoundError: No module named 'rlp’

But rlp is already installed. I checked using pip freeze

eth-hash==0.3.1
eth-typing==2.2.2
eth-utils==1.10.0
ethereum==2.3.1

rlp==0.6.0

rlp is already installed .

(venv) bash-4.3# pip install rlp

Requirement already satisfied: rlp in /root/venv/lib/python3.6/site-packages (0.6.0)

ethereum_requirements.txt contains

coincurve==7.1.0
ethereum==2.3.1

Following is the configuration file-

rlp<1(venv) bash-4.3# cat conf_ethtest.ini
issuing_address = 0xe38eeef35c10e33d077cb4e5cf67bfaec3b26758
chain = ethereum_ropsten
usb_name=/cert-issuer/
key_file=pk_issuer.txt
unsigned_certificates_dir=/cert-issuer/data/unsigned_certificates
blockchain_certificates_dir=/cert-issuer/data/blockchain_certificates
work_dir=/cert-issuer/work
no_safe_mode

How can I get past this error?Please help I am stuck.

Guy can anyone please help in this.
@Taibah @JustNET JustN @dannysuarez @jackblock @yosuke @lemoustachiste Anyone?
I am struck here for couple of days .

I tried after adding scrypt, in the Docker file.

Mentioned by @JustNET

but issue is still there.

My docker file looks like this -

(venv) bash-4.3# cat …/cert-issuer/Dockerfile
FROM seegno/bitcoind:0.13-alpine
MAINTAINER Kim Duffy “kimhd@mit.edu”

COPY . /cert-issuer
COPY conf_regtest.ini /etc/cert-issuer/conf.ini

RUN apk add --update
bash
ca-certificates
curl
gcc
gmp-dev
libffi-dev
libressl-dev
linux-headers
make
musl-dev
python
python3
libssl-dev
build-essential
python-dev
python3-dev
scrypt
tar
g++
libxslt-dev
&& python3 -m ensurepip
&& pip3 install --upgrade pip setuptools
&& mkdir -p /etc/cert-issuer/data/unsigned_certificates
&& mkdir /etc/cert-issuer/data/blockchain_certificates
&& mkdir ~/.bitcoin
&& echo $‘rpcuser=foo\nrpcpassword=bar\nrpcport=8332\nregtest=1\nrelaypriority=0\nrpcallowip=127.0.0.1\nrpcconnect=127.0.0.1\n’ > /root/.bitcoin/bitcoin.conf
&& pip3 install chainpoint>=0.0.2
&& sed -i.bak s/==1.0b1/>=1.0.2/g /usr/lib/python3./site-packages/merkletools-1.0.2-py3..egg-info/requires.txt
&& pip3 install /cert-issuer/.
&& rm -r /usr/lib/python*/ensurepip
&& rm -rf /var/cache/apk/*
&& rm -rf /root/.cache

ENTRYPOINT bitcoind -daemon && bash

I’m sorry I’m not a Python expert, but this looks not directly related to cert-issuer.
@lparker do you have any idea maybe?

I am able to generate a certificate now.

The problem was when i was running the issue command

(venv) bash-4.3# cert-issuer -c conf_ethtest.ini
for some reason instead of considering the installed rlp in virtual environment , it was trying to look outside the virtual env.

I don’t know why this happened . but when i did pip install coincurve==7.1.0
ethereum==2.3.1 & rlp==0.6.0 outside venv , It ran and issued certificate.

I tried checking the path variable but it was already pointing to the venv location. So for the time being I installed the above 3 libs outside venv until anyone can help me point out the issue.

@lemoustachiste Thanks for your support.

To make it short, it means that you lacked some “dependencies” for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python “family”.

The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that python path to your sys.path list. In your notebook, first try:

import sys
sys.path.append('my/path/to/module/folder')

This isn’t a permanent change in sys.path, because when you log out, your environment is reset, so any variables you may have set are lost.

The better (and more permanent) way to solve this is to set your PYTHONPATH, which provides the interpreter with additional directories look in for python packages/modules.

from BASH type: export PYTHONPATH=/path/to/new/folder:/another/path/...../

#each path must be separated by a colon