Discussion:
[Scikit-learn-general] ValueError: numpy.dtype has the wrong size, try recompiling
Veck Hsiao
2014-08-20 07:00:05 UTC
Permalink
Hi ! all,

I just installed scikit-learn and followed with
http://scikit-learn.org/stable/tutorial/basic/tutorial.html

Then I faced a problem when I tried to load dataset from sklearn.

------------------------------------------------------------------------------------------------

Python 2.7.5 (default, Mar 9 2014, 22:15:05)

[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin

Type "help", "copyright", "credits" or "license" for more information.
from sklearn import datasets
Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/Library/Python/2.7/site-packages/sklearn/datasets/__init__.py",
line 7, in <module>

from .base import load_diabetes

File "/Library/Python/2.7/site-packages/sklearn/datasets/base.py", line
25, in <module>

from ..utils import check_random_state

File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py", line
10, in <module>

from .murmurhash import murmurhash3_32

File "numpy.pxd", line 155, in init sklearn.utils.murmurhash
(sklearn/utils/murmurhash.c:5029)

ValueError: numpy.dtype has the wrong size, try recompiling


------------------------------------------------------------------------------------------------

I've tried reinstall scipy, numpy and scikit-learn, but it doesn't help.

Can anyone give me some advise?

Thank a lot!


*Veck Hsiao @ PLSM Lab in Dept. of CS in NCCU*
*About me: http://fbukevin.github.io/Veck/
<http://fbukevin.github.io/Veck/>*
*Blog: http://veck.logdown.com/ <http://veck.logdown.com/>*
federico vaggi
2014-08-20 12:04:24 UTC
Permalink
Are you sure you are 32/64 bit libraries uniformly?
Post by Veck Hsiao
Hi ! all,
I just installed scikit-learn and followed with
http://scikit-learn.org/stable/tutorial/basic/tutorial.html
Then I faced a problem when I tried to load dataset from sklearn.
------------------------------------------------------------------------------------------------
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from sklearn import datasets
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/sklearn/datasets/__init__.py",
line 7, in <module>
from .base import load_diabetes
File "/Library/Python/2.7/site-packages/sklearn/datasets/base.py", line
25, in <module>
from ..utils import check_random_state
File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py", line
10, in <module>
from .murmurhash import murmurhash3_32
File "numpy.pxd", line 155, in init sklearn.utils.murmurhash
(sklearn/utils/murmurhash.c:5029)
ValueError: numpy.dtype has the wrong size, try recompiling
------------------------------------------------------------------------------------------------
I've tried reinstall scipy, numpy and scikit-learn, but it doesn't help.
Can anyone give me some advise?
Thank a lot!
*About me: http://fbukevin.github.io/Veck/
<http://fbukevin.github.io/Veck/>*
*Blog: http://veck.logdown.com/ <http://veck.logdown.com/>*
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
km
2014-08-20 13:04:09 UTC
Permalink
yes..
try recompiling numpy then scipy and then scikit-learn
Regards,
Krishna
Post by federico vaggi
Are you sure you are 32/64 bit libraries uniformly?
Post by Veck Hsiao
Hi ! all,
I just installed scikit-learn and followed with
http://scikit-learn.org/stable/tutorial/basic/tutorial.html
Then I faced a problem when I tried to load dataset from sklearn.
------------------------------------------------------------------------------------------------
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from sklearn import datasets
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/sklearn/datasets/__init__.py",
line 7, in <module>
from .base import load_diabetes
File "/Library/Python/2.7/site-packages/sklearn/datasets/base.py", line
25, in <module>
from ..utils import check_random_state
File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py",
line 10, in <module>
from .murmurhash import murmurhash3_32
File "numpy.pxd", line 155, in init sklearn.utils.murmurhash
(sklearn/utils/murmurhash.c:5029)
ValueError: numpy.dtype has the wrong size, try recompiling
------------------------------------------------------------------------------------------------
I've tried reinstall scipy, numpy and scikit-learn, but it doesn't help.
Can anyone give me some advise?
Thank a lot!
*About me: http://fbukevin.github.io/Veck/
<http://fbukevin.github.io/Veck/>*
*Blog: http://veck.logdown.com/ <http://veck.logdown.com/>*
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Veck Hsiao
2014-08-20 16:30:21 UTC
Permalink
I have no idea about recompiling.
But I found the solution.
I remove scikit-learn installed by pip and install with
https://github.com/scikit-learn/scikit-learn.
And the problem was resolved.

Thanks everybody!



*Veck Hsiao @ PLSM Lab in Dept. of CS in NCCU*
*About me: http://fbukevin.github.io/Veck/
<http://fbukevin.github.io/Veck/>*
*Blog: http://veck.logdown.com/ <http://veck.logdown.com/>*
Post by km
yes..
try recompiling numpy then scipy and then scikit-learn
Regards,
Krishna
Post by federico vaggi
Are you sure you are 32/64 bit libraries uniformly?
Post by Veck Hsiao
Hi ! all,
I just installed scikit-learn and followed with
http://scikit-learn.org/stable/tutorial/basic/tutorial.html
Then I faced a problem when I tried to load dataset from sklearn.
------------------------------------------------------------------------------------------------
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from sklearn import datasets
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/sklearn/datasets/__init__.py",
line 7, in <module>
from .base import load_diabetes
File "/Library/Python/2.7/site-packages/sklearn/datasets/base.py",
line 25, in <module>
from ..utils import check_random_state
File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py",
line 10, in <module>
from .murmurhash import murmurhash3_32
File "numpy.pxd", line 155, in init sklearn.utils.murmurhash
(sklearn/utils/murmurhash.c:5029)
ValueError: numpy.dtype has the wrong size, try recompiling
------------------------------------------------------------------------------------------------
I've tried reinstall scipy, numpy and scikit-learn, but it doesn't help.
Can anyone give me some advise?
Thank a lot!
*About me: http://fbukevin.github.io/Veck/
<http://fbukevin.github.io/Veck/>*
*Blog: http://veck.logdown.com/ <http://veck.logdown.com/>*
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Loading...