4

I just installed python xy 2.7.9 on Windows 7. I went to run some previously written code in Spyder which calls:

from scipy.sparse import linalg as sla

However, I get the following error:

File "C:\Python27\lib\site-packages\scipy\sparse\linalg\__init__.py", line 113, in <module>
from .matfuncs import *

File "C:\Python27\lib\site-packages\scipy\sparse\linalg\matfuncs.py", line 20, in <module>
import scipy.misc

File "C:\Python27\lib\site-packages\scipy\misc\__init__.py", line 44, in <module>
from . import doccer

ImportError: cannot import name doccer

Does anyone know how to fix this? I find this weird because it worked with my previous copy of Python (which I uninstalled before installing the new version).

Thanks!

jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252
Trey
  • 51
  • 1
  • 3
  • It appears the scipy that comes with PythonXY is incomplete. You could try and take this up with the PythonXY maintainers/mailing list. Alternatively, if PythonXY comes with pip, you could try and installing scipy through pip: `pip install --force-reinstall scipy` to get the missing module. –  May 29 '15 at 23:59

1 Answers1

1

What worked for me is moving doccer.py from "misc" folder to "_lib" folder (which are in path /usr/lib/python3/dist-packages/scipy/ for me). I found this in a release note of scipy : https://github.com/scipy/scipy/pull/9652

calvis
  • 11
  • 1