Python support for SSL and HTTPS is not installed

I wanted to give Google’s new Go language a try which requires checking out the source code with Mercurial.

Mercurial was installed from ports on my Mac with


sudo port install mecurial

But checking out the code threw an error.


Chill:~ rus$ hg clone -r release https://go.googlecode.com/hg/ $GOROOT
abort: Python support for SSL and HTTPS is not installed
Exception exceptions.AttributeError: "'httpsrepository' object has no attribute 'urlopener'" in > ignored

After some hunting I found the answer is to install the python socket ssl library from ports


Chill:~ rus$ sudo port install py25-socket-ssl
---> Fetching py25-socket-ssl
---> Verifying checksum(s) for py25-socket-ssl
---> Extracting py25-socket-ssl
---> Configuring py25-socket-ssl
---> Building py25-socket-ssl
---> Staging py25-socket-ssl into destroot
---> Installing py25-socket-ssl @2.5.4_0
---> Activating py25-socket-ssl @2.5.4_0
---> Cleaning py25-socket-ssl

Which then let me check out the source for Go!


Chill:~ rus$ hg clone -r release https://go.googlecode.com/hg/ $GOROOT
requesting all changes
adding changesets
adding manifests
adding file changes
added 3976 changesets with 16799 changes to 2931 files
updating working directory
1640 files updated, 0 files merged, 0 files removed, 0 files unresolved

Now it’s time to compile 😀