Search code examples
anacondaosx-elcapitancvxopt

Import error in anaconda after updating OS to El Capitan


I updated my mac OS system to El Capitan two days ago after its release. However, since then I saw the following error when I tried to import cvxopt (which is working well previously in Yosemite OS.) This error persists even after I reinstall anaconda as well as cvxopt. I am not sure if this is a problem from the OS, anaconda or cvxopt itself. Can anyone help me on this problem? Thanks a lot.

---------------------------------------------------------------------  ------
NameError                                 Traceback (most recent call      last)
<ipython-input-4-14abf1b564a4> in <module>()
----> 1 import cvxopt

/Applications/anaconda/lib/python2.7/site-         packages/cvxopt/__init__.pyc in <module>()
    240         return +reduce(base.ediv, args)
    241 
--> 242 base.normal, base.uniform = normal, uniform
    243 base.setseed, base.getseed = setseed, getseed
    244 base.mul, base.div = mul, div

NameError: name 'base' is not defined

Solution

  • I had the same problem. Here is what worked for me (although I'm far from expert):

    1. Uninstall cvxopt from your system (either with anaconda or with pip)
    2. Upgrade xcode and command line tools to version 7 (this was not done automatically with the el capitan installation not it appears on the updates)
    3. Download the cvxopt package from http://cvxopt.org/download/index.html and build it using the anaconda python: python setup.py build followed by python setup.py install