Python 3.3 and Installing PyOpenSSL on a Mac
Here's how you can install pyOpenSSL on OS X (or just about any other platform):
- Install pip
- Install it using a package for your operating system. For example, if you use brew,
brew install pip
. - If there is no package for your operating system, download https://raw.github.com/pypa/pip/master/contrib/get-pip.py
- Run it (probably as root, unfortunately):
sudo python get-pip.py
- Install it using a package for your operating system. For example, if you use brew,
- Install virtualenv using pip -
pip install --user virtualenv
- Create a virtualenv to install pyOpenSSL into -
virtualenv ~/Environments/pyOpenSSL-stuff
- Activate the virtualenv -
. ~/Environments/pyOpenSSL-stuff/bin/activate
- Install pyOpenSSL with pip -
pip install pyopenssl
At this point you have pyOpenSSL installed in a virtualenv. Any time you want to use pyOpenSSL you'll need to activate the virtualenv. I suggest that you actually create a virtualenv for each project of yours that you work on and install all of the necessary dependencies for each project into that project's virtualenv.
This does result in a lot of duplicate installations of packages. Unfortunately this seems to be the state of the art for Python package installation. Fortunately most Python packages are rather small.