iolib import error in python

501 Views Asked by At

On Mac OS X Mountain Lion, I try

import numpy as np
import os
import statsmodels.api as sm

I get this error:

    /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/idf/PycharmProjects/PyAlgoTrade/GoldvsMiners.py
Traceback (most recent call last):
  File "/Users/idf/PycharmProjects/PyAlgoTrade/GoldvsMiners.py", line 9, in <module>
    import statsmodels.api as sm
  File "/Library/Python/2.7/site-packages/statsmodels-0.0.0-py2.7-macosx-10.8-intel.egg/statsmodels/api.py", line 1, in <module>
    import iolib, datasets, tools
ImportError: No module named iolib

If I add

import sys
print("=======")
print sys.path
print("=======")

I get

=======

['/Users/idf/PycharmProjects/PyAlgoTrade', '/Library/Python/2.7/site-packages/pytz-2013b-py2.7.egg', '/Library/Python/2.7/site-packages/statsmodels-0.0.0-py2.7-macosx-10.8-intel.egg', '/Library/Python/2.7/site-packages/pip-1.4-py2.7.egg', '/Users/idf/PycharmProjects/PyAlgoTrade', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages']
=======

I have tried searching the net, but I am stuck on this one. Any ideas?

0

There are 0 best solutions below