[SciPy-User] Can not import sigtools (latest svn, python 3.1)

575 views
Skip to first unread message

Nadav Horesh

unread,
Nov 22, 2010, 6:56:30 AM11/22/10
to scipy...@scipy.org
>>> from scipy.signal import sepfir2d
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from scipy.signal import sepfir2d
File "/usr/lib64/python3.1/site-packages/scipy/signal/__init__.py", line 11, in <module>
from .fir_filter_design import *
File "/usr/lib64/python3.1/site-packages/scipy/signal/fir_filter_design.py", line 6, in <module>
import sigtools

I edited "fir_filter_design.py" and chaned to:

from scipy.signal import sigtools

but then I got the error:

File "/usr/lib64/python3.1/site-packages/scipy/signal/__init__.py", line 7, in <module>
from . import sigtools
ImportError: cannot import name sigtools

I do not know how to fix this. Any ideas?

Nadav
_______________________________________________
SciPy-User mailing list
SciPy...@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user

Nadav Horesh

unread,
Nov 22, 2010, 6:56:38 AM11/22/10
to scipy...@scipy.org

David Cournapeau

unread,
Nov 22, 2010, 7:04:27 AM11/22/10
to SciPy Users List
On Mon, Nov 22, 2010 at 8:56 PM, Nadav Horesh <nad...@visionsense.com> wrote:
>>>> from scipy.signal import sepfir2d
> Traceback (most recent call last):
>  File "<pyshell#0>", line 1, in <module>
>    from scipy.signal import sepfir2d
>  File "/usr/lib64/python3.1/site-packages/scipy/signal/__init__.py", line 11, in <module>
>    from .fir_filter_design import *
>  File "/usr/lib64/python3.1/site-packages/scipy/signal/fir_filter_design.py", line 6, in <module>
>    import sigtools
>
> I edited "fir_filter_design.py" and chaned to:
>
> from scipy.signal import sigtools
>
> but then I got the error:
>
>  File "/usr/lib64/python3.1/site-packages/scipy/signal/__init__.py", line 7, in <module>
>    from . import sigtools
> ImportError: cannot import name sigtools

Most likely a build error: to confirm, please go into the directory
where sigtools.so is located and do a direct import:

python -c "import sigtools"

this should give a better explanation,

cheers,

David

Pauli Virtanen

unread,
Nov 22, 2010, 7:04:52 AM11/22/10
to scipy...@scipy.org
Mon, 22 Nov 2010 03:56:38 -0800, Nadav Horesh wrote:
[clip]

> from scipy.signal import sigtools
>
> but then I got the error:
>
> File "/usr/lib64/python3.1/site-packages/scipy/signal/__init__.py",
> line 7, in <module>
> from . import sigtools
> ImportError: cannot import name sigtools
>
> I do not know how to fix this. Any ideas?

rm -rf build

and try again? The 2to3 process breaks if you interrupt it.

--
Pauli Virtanen

Nadav Horesh

unread,
Nov 25, 2010, 12:08:55 AM11/25/10
to scipy...@scipy.org

________________________________________
From: Nadav Horesh
Sent: 24 November 2010 19:51
To: scipy...@scipy.org
Subject:

My mistake was that I did not restart python3 after fixing line 6 of scipy/signal/fir_filter_design.py.
This line should be corrected to:

from . import sigtools


Thank you very much,

Nadav

Reply all
Reply to author
Forward
0 new messages