I installed scipy and numpy using apt-get on ubuntu and it was working fine until I tried using scikit-image. It seems that there is a module named six inside scipy.lib which is not present in the scipy. And hence I am getting
File "/usr/lib/python2.7/dist-packages/scipy/ndimage/_ni_support.py", line 35, in <module>
from scipy.lib.six import integer_types, string_types
ImportError: No module named six
Is there a workaround for installing the six module?
My scipy version is 0.13.3.
EDIT : It turns out that the six module is indeed the same package known by the name six. I uninstalled six and python-scipy and while reinstalling scipy I got the following error
W: pycompile:160: dangling symlink skipped: /usr/lib/python2.7/dist-packages/scipy/lib/decorator.py (../../decorator.py)
W: pycompile:160: dangling symlink skipped: /usr/lib/python2.7/dist-packages/scipy/lib/six.py (../../six.py)
RE-EDIT : I think I figured out the problem. While installing scipy, it tries to make a symlink to the already installed six module inside the dist-packages. But catch is that scipy is installed inside /usr/lib/ and six inside /usr/local/lib.
sixis a set of utilities that allows code that runs on both python-2 and python-3 to be written. It is available in scipy 0.15.1 which I have. – icedwater Jan 13 '16 at 9:44six. Here the module is being imported fromscipy.libwhich is kindda different. – Himanshu Mishra Jan 13 '16 at 9:47sixfirst, I usedapt-getto installscipyon my VM (that's 0.13.3 like yours), and I was able to import the two variables listed above. Also,scipy.lib.six-is- the python compatibility package, I got that line fromhelp(scipy.lib.six)in the console. – icedwater Jan 13 '16 at 9:56scipy, one in/usr/liband another in/usr/local/lib. I seem to be using the latter, as the former doesn't seem to have thesixlibrary inside thelib/directory. I wonder how to fix this bug upstream... – icedwater Jan 14 '16 at 10:10python-scipy. – Himanshu Mishra Jan 14 '16 at 13:19