Fix Python – ImportError: cannot open shared object file: No such file or directory

When trying to import OpenCV, using import cv2 I get the following error:
/usr/local/lib/python2.7/dist-packages/cv2/ in ()
8 # make IDE’s (PyCharm) autocompletion happy
—-> 9 from .cv2 import *
11 # wildcard import above does not import “private” variables like __version__


Fix Python – Unable to import a module that is definitely installed

After installing mechanize, I don’t seem to be able to import it.
I have tried installing from pip, easy_install, and via python install from this repo: All of this to no avail, as each time I enter my Python interactive I get:
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type “….

Fix Python – How to write a Python module/package?

I’ve been making Python scripts for simple tasks at work and never really bothered packaging them for others to use. Now I have been assigned to make a Python wrapper for a REST API. I have absolutely no idea on how to start and I need help.
What I have:
(Just want to be specific as possible) I have the virtualenv ready, it’s also up in github, th….