scipy 0.6.0 ImportError: cannot import name cscmux
Hi. Im Youngsu-park ,in POSTECH in south korea. I had same problem on scipy importing like: from scipy import * . So I looked at the scipy/sparse folder, "C:\Python25\Lib\site-packages\scipy\sparse". To find the reason of error, I open the "C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \ cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \ densetocsr, csrtodense, \ csrmucsr, cscmucsc, \ csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \ csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse", import sparestools and use dir function to see the members of sparsetools In [16]: import sparsetoo In [17]: dir(sparsetools) Out[17]: ['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract', 'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo', 'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc', 'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux', 'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc', 'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr', 'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc', 'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr', 'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc', 'zfulltocsc', 'ztransp'] But it is not the members of sparsetools.py I think it is the members of sparsetools.pyd. Move sparsetools.pyd to some backup directory. Then it will works well. In [21]: from scipy import * In [22]:
Hi. Im Youngsu-park ,in POSTECH in south korea. I had same problem on scipy importing like: from scipy import * . So I looked at the scipy/sparse folder, "C:\Python25\Lib\site-packages\scipy\sparse ". To find the reason of error, I open the "C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \ cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \ densetocsr, csrtodense, \ csrmucsr, cscmucsc, \ csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \ csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ", import sparestools and use dir function to see the members of sparsetools In [16]: import sparsetoo In [17]: dir(sparsetools) Out[17]: ['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract', 'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo', 'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc', 'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux', 'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc', 'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr', 'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc', 'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr', 'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc', 'zfulltocsc', 'ztransp'] But it is not the members of sparsetools.py I think it is the members of sparsetools.pyd. Move sparsetools.pyd to some backup directory. Then it will works well. In [21]: from scipy import * In [22]: <scipy-user@scipy>
I had the same problem in Linux. But in Linux there are no .pyd files. I noticed that there were two shared libraries: sparsetools.so and _sparsetools.so. The first one was much smaller than the second, so I moved it to a backup directory. Then, everything worked fine. hth, L. On Nov 18, 2007 11:50 AM, youngsu park <youngsu999@gmail.com> wrote:
Hi. Im Youngsu-park ,in POSTECH in south korea.
I had same problem on scipy importing like:
from scipy import *
.
So I looked at the scipy/sparse folder,
"C:\Python25\Lib\site-packages\scipy\sparse ".
To find the reason of error, I open the
"C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \
cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
densetocsr, csrtodense, \
csrmucsr, cscmucsc, \
csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc
I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ",
import sparestools and use dir function to see the members of sparsetools
In [16]: import sparsetoo
In [17]: dir(sparsetools)
Out[17]:
['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract',
'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo',
'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc',
'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux',
'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr',
'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr',
'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc',
'zfulltocsc', 'ztransp']
But it is not the members of sparsetools.py
I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory.
Then it will works well.
In [21]: from scipy import *
In [22]:
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
ops. I was wrong. it still doesn't work... sorry for the noise. L. On 12/1/07, lorenzo bolla <lbolla@gmail.com> wrote:
I had the same problem in Linux. But in Linux there are no .pyd files.
I noticed that there were two shared libraries: sparsetools.so and _sparsetools.so. The first one was much smaller than the second, so I moved it to a backup directory.
Then, everything worked fine.
hth, L.
On Nov 18, 2007 11:50 AM, youngsu park <youngsu999@gmail.com> wrote:
Hi. Im Youngsu-park ,in POSTECH in south korea.
I had same problem on scipy importing like:
from scipy import *
.
So I looked at the scipy/sparse folder,
"C:\Python25\Lib\site-packages\scipy\sparse ".
To find the reason of error, I open the
"C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \
cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
densetocsr, csrtodense, \
csrmucsr, cscmucsc, \
csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc
I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ",
import sparestools and use dir function to see the members of sparsetools
In [16]: import sparsetoo
In [17]: dir(sparsetools)
Out[17]:
['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract',
'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo',
'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc',
'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux',
'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr',
'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr',
'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc',
'zfulltocsc', 'ztransp']
But it is not the members of sparsetools.py
I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory.
Then it will works well.
In [21]: from scipy import *
In [22]:
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
How did you install scipy ? Which Python version ? ... ? 2007/11/18, youngsu park <youngsu999@gmail.com>:
Hi. Im Youngsu-park ,in POSTECH in south korea.
I had same problem on scipy importing like:
from scipy import *
.
So I looked at the scipy/sparse folder,
"C:\Python25\Lib\site-packages\scipy\sparse ".
To find the reason of error, I open the
"C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \
cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
densetocsr, csrtodense, \
csrmucsr, cscmucsc, \
csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc
I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ",
import sparestools and use dir function to see the members of sparsetools
In [16]: import sparsetoo
In [17]: dir(sparsetools)
Out[17]:
['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract',
'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo',
'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc',
'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux',
'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr',
'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr',
'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc',
'zfulltocsc', 'ztransp']
But it is not the members of sparsetools.py
I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory.
Then it will works well.
In [21]: from scipy import *
In [22]:
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher
python 2.4 last numpy (from svn) last scipy (from svn) the strange thing is: it works on cygwin on a windows box, but not on ubuntu! On 12/3/07, Matthieu Brucher <matthieu.brucher@gmail.com> wrote:
How did you install scipy ? Which Python version ? ... ?
2007/11/18, youngsu park <youngsu999@gmail.com>:
Hi. Im Youngsu-park ,in POSTECH in south korea.
I had same problem on scipy importing like:
from scipy import *
.
So I looked at the scipy/sparse folder,
"C:\Python25\Lib\site-packages\scipy\sparse ".
To find the reason of error, I open the
"C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \
cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
densetocsr, csrtodense, \
csrmucsr, cscmucsc, \
csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc
I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ",
import sparestools and use dir function to see the members of sparsetools
In [16]: import sparsetoo
In [17]: dir(sparsetools)
Out[17]:
['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract',
'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo',
'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc',
'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux',
'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr',
'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr',
'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc',
'zfulltocsc', 'ztransp']
But it is not the members of sparsetools.py
I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory.
Then it will works well.
In [21]: from scipy import *
In [22]:
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
The newly added README in scipy/sparse/sparsetools/README.txt says """ Before regenerating sparsetools_wrap.cxx with SWIG, ensure that you are using SWIG Version 1.3.33 (released on Nov. 23 2007) or newer. You can check your version with: 'swig -version' The wrappers are generated with: swig -c++ -python multigridtools.i """ maybe your problems are related to this? btw. Out[1]: <unittest._TextTestResult run=1809 errors=0 failures=0> on Gentoo linux, updated just now. r. lorenzo bolla wrote:
python 2.4 last numpy (from svn) last scipy (from svn)
the strange thing is: it works on cygwin on a windows box, but not on ubuntu!
On 12/3/07, Matthieu Brucher <matthieu.brucher@gmail.com> wrote:
How did you install scipy ? Which Python version ? ... ?
2007/11/18, youngsu park <youngsu999@gmail.com>:
Hi. Im Youngsu-park ,in POSTECH in south korea.
I had same problem on scipy importing like:
from scipy import *
.
So I looked at the scipy/sparse folder,
"C:\Python25\Lib\site-packages\scipy\sparse ".
To find the reason of error, I open the
"C:\Python25\Lib\site-packages\scipy\sparse\sparse.py", file.
From line 21 to 26, there was import statement for "sparsetools"
from scipy.sparse.sparsetools import cscmux, csrmux, \
cootocsr, csrtocoo, cootocsc, csctocoo, csctocsr, csrtocsc, \
densetocsr, csrtodense, \
csrmucsr, cscmucsc, \
csr_plus_csr, csc_plus_csc, csr_minus_csr, csc_minus_csc, \
csr_elmul_csr, csc_elmul_csc, csr_eldiv_csr, csc_eldiv_csc
I change the working directory to "C:\Python25\Lib\site-packages\scipy\sparse ",
import sparestools and use dir function to see the members of sparsetools
In [16]: import sparsetoo
In [17]: dir(sparsetools)
Out[17]:
['__doc__', '__file__', '__name__', '__version__', 'ccootocsc', 'ccscadd', 'ccscextract',
'ccscgetel', 'ccscmucsc', 'ccscmucsr', 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo',
'ccsctofull', 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp', 'dcootocsc',
'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc', 'dcscmucsr', 'dcscmul', 'dcscmux',
'dcscsetel', 'dcsctocoo', 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel', 'scscmucsc', 'scscmucsr',
'scscmul', 'scscmux', 'scscsetel', 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract', 'zcscgetel', 'zcscmucsc', 'zcscmucsr',
'zcscmul', 'zcscmux', 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux', 'zdiatocsc',
'zfulltocsc', 'ztransp']
But it is not the members of sparsetools.py
I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory.
Then it will works well.
In [21]: from scipy import *
In [22]:
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
------------------------------------------------------------------------
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
youngsu park <youngsu999 <at> gmail.com> writes:
But it is not the members of sparsetools.py I think it is the members of sparsetools.pyd.
Move sparsetools.pyd to some backup directory. Then it will works well.
In [21]: from scipy import *
In [22]:
I believe sparsetools.pyd is from a previous scipy installation. Deleting it should work (as you've done). To be safe I would delete /site-packages/scipy and reinstall scipy.
participants (5)
-
lorenzo bolla -
Matthieu Brucher -
Nathan Bell -
Robert Cimrman -
youngsu park