command "solc-select install" meets error
Ubuntu 18.04 and Ubuntu 20.04 on local virtual machine
When I use the command solc-select install or solc-select install A_SOLC_VERSION(e.g, 0.4.25), I meet with the error as follows:
Available versions to install:
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1007, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 947, in send
self.connect()
File "/usr/lib/python3.8/http/client.py", line 1414, in connect
super().connect()
File "/usr/lib/python3.8/http/client.py", line 918, in connect
self.sock = self._create_connection(
File "/usr/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/wy/.local/bin/solc-select", line 8, in <module>
sys.exit(solc_select())
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/__main__.py", line 48, in solc_select
for version in get_installable_versions():
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/solc_select.py", line 105, in get_installable_versions
installable = list(set(get_available_versions()) - set(installed_versions()))
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/solc_select.py", line 115, in get_available_versions
available_releases.update(get_additional_linux_versions())
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/solc_select.py", line 123, in get_additional_linux_versions
github_json = urllib.request.urlopen(url).read()
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1397, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
But these two commands indeed works on the inspur linux server(Ubuntu18.04). And I notice that there has been several identical issues published.
Hey @MrWiffer, thanks for the stack trace! It suggests it may be a bug introduced in our 0.2.1 release. Can you try downgrading to 0.2.0 on the Ubuntu 20.04 machine, and let me know if it works?
pip3 uninstall solc-select
pip3 install solc-select==0.2.0
solc-select install
Hey @MrWiffer, thanks for the stack trace! It suggests it may be a bug introduced in our 0.2.1 release. Can you try downgrading to
0.2.0on the Ubuntu 20.04 machine, and let me know if it works?pip3 uninstall solc-select pip3 install solc-select==0.2.0 solc-select install
I've tried in this way.
command solc-select install works, but when I want to install solc 0.4.25 via solc-select install 0.4.25, there is something wrong:
wy@wy-virtual-machine:~$ solc-select install 0.8.0
Installing '0.8.0'...
Traceback (most recent call last):
File "/usr/bin/solc-select", line 8, in <module>
sys.exit(solc_select())
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/__main__.py", line 27, in solc_select
install_artifacts(args.get(INSTALL_VERSIONS))
File "/home/wy/.local/lib/python3.8/site-packages/solc_select/solc_select.py", line 45, in install_artifacts
urllib.request.urlretrieve(url, artifact_file)
File "/usr/local/python3/lib/python3.8/urllib/request.py", line 276, in urlretrieve
block = fp.read(bs)
File "/usr/local/python3/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/local/python3/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/local/python3/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/local/python3/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/python3/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
What's more, the issue above occurs when I have upgrade the Python version on my Ubuntu18.04, from 3.6.9 to 3.8.11. I tried to install solc on my Ubuntu20.04 LTS with system Python version and it works. It's so odd.
Hey @NatalieChin80 I have the same issue but downgrading didn't solve it. Still see the exact issue. The strange part is that it works fine on my other computer with a similar condition(maybe my python versions differ)- both macs.
ok after hours of playing with different versions, frist, it seems that latest version of solc-select does not work any python's version I tried(I tried 3.8.9, 3.9.9, 3.10.2 and a few others). second the version @NatalieChin80 suggests seems to only be working with python 3.9.9 on mac.
for other people having issues to downgrade their python3, try using pyenv, but before that make sure you have deleted python3 from /Library/Frameworks/Python.framework and from your $PATH. For some weird reason, it was exported in .zprofile instead of .zshrc
tks