Error installing cert-issuer on ethereum


#1

When I ran
python setup.py experimental --blockchain=ethereum
to set up cert-issuer on ethereum, I got the following error:

image
Annas-MacBook-Air:cert-issuer annacuddeback$ python setup.py experimental --blockchain=ethereum
running experimental
Collecting cert-core>=2.1.9
Could not fetch URL https://pypi.python.org/simple/cert-core/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) - skipping
Could not find a version that satisfies the requirement cert-core>=2.1.9 (from versions: )
No matching distribution found for cert-core>=2.1.9
Traceback (most recent call last):
File “setup.py”, line 70, in
packages=find_packages()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”, line 151, in setup
dist.run_commands()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py”, line 953, in run_commands
self.run_command(cmd)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py”, line 972, in run_command
cmd_obj.run()
File “setup.py”, line 44, in run
install(reqs)
File “setup.py”, line 48, in install
subprocess.check_call([sys.executable, ‘-m’, ‘pip’, ‘install’, package])
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”, line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python’, ‘-m’, ‘pip’, ‘install’, ‘cert-core>=2.1.9\n’]’ returned non-zero exit status 1
Annas-MacBook-Air:cert-issuer annacuddeback$

When I tried installing cert-issuer on ethereum I first mistakenly ran
python setup.py install
which may have something to do with the errors I’m having. Did anyone else run into this? So far I’ve tried uninstalling setup.py, but I get the following error:
Annas-MacBook-Air:cert-issuer annacuddeback$ pip uninstall setup.py
Skipping setup.py as it is not installed.

Has anyone else run into this problem? If so, how did you resolve it?


#2

Hello @eulerspython,

I ran this cert-issuer in docker just now and didn’t have a problem:

Collecting cert-core>=2.1.9 (from cert-issuer==2.0.15)

  Downloading https://files.pythonhosted.org/packages/7a/fa/8c0f1b9de6931449dff429712eb1fbe1bc6961f6bc0f222dc59cf5203f0b/cert-core-2.1.9.tar.gz

I don’t run cert-issuer locally usually, but I do notice that it’s trying to use python2.7? My docker imagine seems to be using 3.6.

Try python3 instead of python in your command. Also, it looks like it’s an SSL error, so maybe that’s been resolved by now?


#3

Thank you! Running the command with python3 instead of python seems to have resolved the cert-core error since it didn’t have any problem collecting it this time. When I ran it though, I got a traceback error partway through:

This appears to be an issue with the setup.py file, does it need to be modified?


#4

While I’m not familiar with this exact error, I do see a reference to pysha3 in the red error log. I’ve had problems with this as well due to conflicting package dependencies.

The dockerfile handles this dependency conflict, and locally I’ve had to do a little digging myself to handle it. Check out this link for more info on it, I hope it solves your problem but if not let me know.

Quote from that link:


#5

I’m trying to use vi /usr/local/lib/python3.6/site-packages/chainpoint-0.0.2.dist-info/METADATA to change the merkletools settings but the endpoint doesn’t exist so it just creates a new directory that I then can’t edit with vim. I have a friend who is also working through this and she resolved the problem by re-installing pysha3, but when I did it I still got almost the exact same error:

Command “/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c “import setuptools, tokenize;file=’/private/var/folders/q0/h9rx8b3s14g_33ng9xz31ykw0000gn/T/pip-install-u5_mbi0a/pysha3/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /private/var/folders/q0/h9rx8b3s14g_33ng9xz31ykw0000gn/T/pip-record-fp3_wynx/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /private/var/folders/q0/h9rx8b3s14g_33ng9xz31ykw0000gn/T/pip-install-u5_mbi0a/pysha3/

Could it be a problem with my python library? Should I wipe all python3 from my computer and reinstall?


#6

I don’t have enough python experience as I’d like, I think a lot of people use virtual environments (and it’s technically suggested we do so with our blockcerts python code). If you are using a venv, then the path might be different than what I said. I believe I wasn’t using a venv when I was going through it (shame on me).

Try using a venv if you aren’t already, so you can avoid having to wipe python from your computer. Check out this link for more info on it: https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md

I opened up a ticket with chainpoint but it looks neglected. Might just fork it myself and apply needed changes at some point in the future.


#7

I tried running this in a venv (I wasn’t already) and was actually able to edit in vim but when I hit esc and ran “:wq” I got this error:
/usr/local/lib/python3.6/site-packages/chainpoint-0.0.2.dist-info/METADATA" E212: Can’t open file for writing


#8

Actually it appears I don’t have a python3.6 directory in /usr/local/lib, so I’m looking into that now. That’s probably the root of all my routing errors.


#9

If you’re running it in venv, then I think the path to your site-packages is going to be different. I am unsure of how to figure that out, but if anyone here has experience with venv, or if you figure out how to find the path, it would be appreciated if it was posted here. I think this issue has come up more than I’d like :frowning:


#10

I searched my computer and tried to find “merkle” in every METADATA file I could find.

This is the only METADATA file I could find that had any appearance of “merkle” in it:



Where am I supposed to edit the merkletools requirements?


#12

Some others were not able to find it either. Perhaps looking for

merkletools-1.0.2-py3.*.egg-info/requires.txt

and replacing pysha3==1.0b1with pysha3==1.0.2 might work instead?

On our linux docker file, we handle that automatically with this script:

 sed -i.bak s/==1\.0b1/\>=1\.0\.2/g /usr/lib/python3.*/site-packages/merkletools-1.0.2-py3.*.egg-info/requires.txt

But on Mac you’d have to find the merkletools site-package location for your environment.


#13

I found the site-packages directory under venv,

[cert-issuer-path]/cert-issuer/venv/lib/python3.6/site-packages

but I can’t find the chainpoint-0.0.2.dist-info directory inside it. Is it possible the correct METADATA file may be someplace else?

Also, any thoughts on where I can find “merkletools-1.0.2-py3.*.egg-info/requires.txt”? I found a reference to it in the Dockerfile, but I couldn’t find the file itself. I also searched for “egg-info/requires.txt” and “requires.txt” and didn’t find it. Is it possible I don’t have the right libraries downloaded?

I included the photo of the file path below in case seeing the folders in site-packages would be helpful