I have installed python3.7 in ubuntu 14. Below is the process I followed
- Downloaded python 3.7
./configuresudo makesudo make install
Now I am running the follwoing code
from urllib.request import urlopen
resp = urlopen('http://github.com')
print(resp.read())
But it is giving the following errors on console:
Traceback (most recent call last):
File "test.py", line 2, in <module>
resp = urlopen('https://github.com')
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 548, in _open
'unknown_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 1387, in unknown_open
raise URLError('unknown url type: %s' % type)`enter code here`
urllib.error.URLError: <urlopen error unknown url type: https>
Could someone please help me on this.
resp = urlopen('https://github.com')- noticehttps