[SciPy-User] Spyder-Ubuntu 12.04 problem with SciPy 0.11.0rc1

Scott Sinclair scott.sinclair.za at gmail.com
Mon Jul 23 02:50:25 EDT 2012


On 22 July 2012 11:20, Virgil Stokes <vs at it.uu.se> wrote:
> On 22-Jul-2012 09:14, Scott Sinclair wrote:
>
> On Jul 21, 2012 1:19 PM, "Virgil Stokes" <vs at it.uu.se> wrote:
>>
>> I installed SciPy 0.11.0rc1 on an Ubuntu 12.04 (64-bit) platform with what
>> seemed to be no problems.
>> However, when I ran Spyder it still was using SciPy 0.10.1. I then tried
>> to
>> uninstall SciPy completely using
>>
>>   >pip uninstall SciPy
>>
>> which again seemed to be ok. But, now I was unable to execute Spyder! I
>> tried
>> several times to uninstall and reinstall Spyder but I am stuck with no
>> possibility to run Spyder. I get no error; but, clicking in this
>> application in
>> Ubuntu 12.04 seems to be ignored.
>
> I tried some more things; but, first here is what I get when I try to run
> Spyder from a command line:
>
> root at virgil-laptop:/usr/local/bin# spyder
> Traceback (most recent call last):
>   File "/usr/local/bin/spyder", line 2, in <module>
>     from spyderlib import spyder
>   File "/usr/local/lib/python2.7/dist-packages/spyderlib/spyder.py", line
> 91, in <module>
>     from spyderlib.utils.environ import WinUserEnvDialog
>   File "/usr/local/lib/python2.7/dist-packages/spyderlib/utils/environ.py",
> line 17, in <module>
>     from spyderlib.widgets.dicteditor import DictEditor
>   File
> "/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/dicteditor.py",
> line 31, in <module>
>     from spyderlib.config import get_icon, get_font
>   File "/usr/local/lib/python2.7/dist-packages/spyderlib/config.py", line
> 27, in <module>
>     from spyderlib.utils import iofuncs, codeanalysis
>   File "/usr/local/lib/python2.7/dist-packages/spyderlib/utils/iofuncs.py",
> line 33, in <module>
>     import scipy.io as spio
>   File "/usr/local/lib/python2.7/dist-packages/scipy/io/__init__.py", line
> 83, in <module>
>     from matlab import loadmat, savemat, byteordercodes
>   File "/usr/local/lib/python2.7/dist-packages/scipy/io/matlab/__init__.py",
> line 11, in <module>
>     from mio import loadmat, savemat
>   File "/usr/local/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line
> 15, in <module>
>     from mio4 import MatFile4Reader, MatFile4Writer
>   File "/usr/local/lib/python2.7/dist-packages/scipy/io/matlab/mio4.py",
> line 9, in <module>
>     import scipy.sparse/usr/local/lib/python2.7/dist-packages/scipy
>   File "/usr/local/lib/python2.7/dist-packages/scipy/sparse/__init__.py",
> line 182, in <module>
>     from csgraph import *
> AttributeError: 'module' object has no attribute 'csgraph_to_masked'
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It's not a good idea to be running as root. The recommended practice
is to run terminal sessions as your regular user and use `sudo` if you
need temporary privileges to access system directories etc.

It looks like your scipy install in
/usr/local/lib/python2.7/dist-packages/scipy/ was broken when you
tried to install the release candidate. The minimum you'll need to do
is remove the broken scipy install and reinstall it. I suggest the
following (as your regular user):

# Remove broken scipy install
virgil at virgil-laptop:~$ sudo rm -rf
/usr/local/lib/python2.7/dist-packages/scipy/
virgil at virgil-laptop:~$ sudo rm -rf
/usr/local/lib/python2.7/dist-packages/scipy-*.egg*

# Do a fresh install
# Either
virgil at virgil-laptop:~$ sudo pip install scipy
# or avoid mucking in your system directories
virgil at virgil-laptop:~$ pip install --user scipy

# Install python-nose using your package manager or do
virgil at virgil-laptop:~$ pip install --user nose

# and test your scipy
virgil at virgil-laptop:~$ python -c "import scipy; scipy.test()"

If you're lucky the scipy test suite will complete without any errors
and Spyder will work at this point. If you still have problems with
scipy let us know, if your spyder install doesn't work you'll need to
trouble-shoot it over on the spyder list
(https://groups.google.com/forum/?fromgroups#!forum/spyderlib).

Good luck!

Cheers,
Scott



More information about the SciPy-User mailing list