[scikit-learn] Fwd: ValueError

Sebastian Raschka mail at sebastianraschka.com
Wed Jun 1 14:00:58 EDT 2016


Sorry, 

$ python -c 'import numpy; print(scipy.__version__)’

was a type, it should be 

$ python -c 'import scipy; print(scipy.__version__)’

However, I’d recommend looking at the Issue 6706 as Nelson Liu suggested for further debugging (https://github.com/scikit-learn/scikit-learn/issues/6706)!

Like Maniteja suggested, it is likely due to “a mismatch between numpy installed and the one scikit-learn is compiled with"

Best,
Sebastian

> On Jun 1, 2016, at 1:55 PM, Ruchika Nayyar <ruchika.work at gmail.com> wrote:
> 
> Hello Sebastian 
> 
> Thanks for some insight.. So here are some of my responses 
> 
> 1) $ python -c 'import numpy; print(numpy.__version__)'
> 1.8.0rc1
> 
> 2)  python -c 'import numpy; print(scipy.__version__)'
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> NameError: name 'scipy' is not defined
> 
> 
> And I installed everything using pip install numpy/scikit-learn 
> and so on. 
> But when I tried to do this 
> pip install --upgrade scipy
> Requirement already up-to-date: scipy in /Library/Python/2.7/site-packages
> Requirement already up-to-date: numpy>=1.6.2 in /Library/Python/2.7/site-packages (from scipy)
> 
> 
> So not sure why it is not being defined. 
> Thanks,
> Ruchika
> ----------------------------------------
> Dr Ruchika Nayyar,
> Post Doctoral Fellow for ATLAS Collaboration
> University of Arizona 
> Arizona, USA.
> --------------------------------------------
> 
> On Wed, Jun 1, 2016 at 10:46 AM, Sebastian Raschka <mail at sebastianraschka.com> wrote:
> Hi Ruchika,
> 
> could you maybe post the results from
> 
> $ python -c 'import numpy; print(numpy.__version__)'
> 1.11.0
> $ python -c 'import numpy; print(scipy.__version__)'
> 0.17.0
> 
> just to make sure that these are indeed the latest versions? However, I suspect that this is more of a compile rather than a version issue since scikit should work fine on older versions of NumPy and SciPy — e.g., one of the CI tests is running with NUMPY_VERSION=“1.6.2” and SCIPY_VERSION="0.11.0"
> 
> Does NumPy run correctly if you run some examples without scikit-learn?
> E.g., you may want to run
> 
> import numpy
> numpy.test('full')
> 
> import scipy
> scipy.test('full’)
> 
> to narrow down the problem further.
> 
> And how did you compile & install scikit-learn?
> 
> Best,
> Sebastian
> 
> > On Jun 1, 2016, at 1:24 PM, Ruchika Nayyar <ruchika.work at gmail.com> wrote:
> >
> >
> > Thanks,
> > Ruchika
> > ----------------------------------------
> > Dr Ruchika Nayyar,
> > Post Doctoral Fellow for ATLAS Collaboration
> > University of Arizona
> > Arizona, USA.
> > --------------------------------------------
> >
> > ---------- Forwarded message ----------
> > From: <scikit-learn-owner at python.org>
> > Date: Wed, Jun 1, 2016 at 10:23 AM
> > Subject: ValueError
> > To: ruchika.work at gmail.com
> >
> >
> > This list allows posts by subscribers only. Please subscribe at
> > https://mail.python.org/mailman/listinfo/scikit-learn to post to the
> > list.
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Ruchika Nayyar <ruchika.work at gmail.com>
> > To: scikit-learn at python.org
> > Cc:
> > Date: Wed, 1 Jun 2016 10:23:14 -0700
> > Subject: ValueError
> > Hi
> >
> > I am new to scikit-learn and while writing a python script to do a simple BDT using scikit-learn. I see error when I do this:
> >
> > from sklearn import datasets
> >
> >
> > Traceback (most recent call last):
> >   File "bdt.py", line 12, in <module>
> >     from sklearn import datasets
> >   File "/Library/Python/2.7/site-packages/sklearn/__init__.py", line 57, in <module>
> >     from .base import clone
> >   File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in <module>
> >     from .utils.fixes import signature
> >   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 have already tried to uninstall numpy/scipy and pandas. They all are the latest and compatible version but something is not right. Can you tell me what I am doing wrong?
> >
> > Thanks,
> > Ruchika
> > ----------------------------------------
> > Dr Ruchika Nayyar,
> > Post Doctoral Fellow for ATLAS Collaboration
> > University of Arizona
> > Arizona, USA.
> > --------------------------------------------
> >
> >
> > _______________________________________________
> > scikit-learn mailing list
> > scikit-learn at python.org
> > https://mail.python.org/mailman/listinfo/scikit-learn
> 
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
> 
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn



More information about the scikit-learn mailing list