Running Cert-issuer without cert-issuer command

I am trying to run cert-issuer by running a python file. I am inside a virtual env with default chain as ethereum (python setup.py experimental --blockchain=ethereum)

If I try to issue certificate via command cert-issuer -c conf_ethtest.ini
I am able to generate the certificate.

But if I try to issue certificate by command python3 cert_issuer/main.py
I get error - No module named chainpoint.

I am not sure why this error is coming and that to ModuleNotFound.

How can I issue Ethereum certificate by directly running a python (.py) file

I tried main.py as I believe this file is the entry point for issuing certificate.

Hello! I get the impression here that you have two instances of cert-issuer going. One is somewhere on your path - maybe a global install? Another is the one that you’re trying to run out of the local repo.

To gather info, you might want to run which cert-issuer to see where that’s coming from. You might want to try to remove it to avoid confusion, though that can certainly wait.

As for __main.py__: the chainpoint library and related dependencies have given us headaches in the past. Recently, changes made it in that help to work around this. If you are trying to issue a v2 Blockcert, you might want to git checkout v2, to make sure you’re using the correct code, and git pull to see if anything updates.

If that doesn’t work on its own, you can try to uninstall the existing set of dependencies, and then reinstall them, forcing pip to avoid using cache. Something like this (make sure you’re in the virtualenv!):

pip freeze | xargs pip uninstall -y
pip install -r ethereum_requirements.txt --no-cache
pip install -r requirements.txt --no-cache

That should leave you in a state sufficient to run __main.py__. It seems to work for me, so if the above doesn’t work for you, please let me know and we’ll gather more info.

Thanks,
Lucas