[scikit-learn] Fwd: ValueError
Sebastian Raschka
mail at sebastianraschka.com
Wed Jun 1 14:56:06 EDT 2016
> I just removed the default one that came with python 2.7
As a general advice, I would never ever mess with the system Python; you could easily break something … “important” :P Why not creating a separate virtual environment to be on the safe side?
> On Jun 1, 2016, at 2:51 PM, Ruchika Nayyar <ruchika.work at gmail.com> wrote:
>
> Much thanks for your advice I was able to sort out the issue with ValueError due to num/scipy
> I just removed the default one that came with python 2.7 and re-installed latest version.
> I did the same for matplotlib but if I do this
> import matplotlib.pyplot as plt
>
> It gives me this error:
> Learning BDTs with TMVA and Scikit
> /Library/Python/2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
> warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
> Traceback (most recent call last):
> File "bdt.py", line 12, in <module>
> import matplotlib.pyplot as plt
> File "/Library/Python/2.7/site-packages/matplotlib/pyplot.py", line 36, in <module>
> from matplotlib.figure import Figure, figaspect
> File "/Library/Python/2.7/site-packages/matplotlib/figure.py", line 40, in <module>
> from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
> File "/Library/Python/2.7/site-packages/matplotlib/axes/__init__.py", line 4, in <module>
> from ._subplots import *
> File "/Library/Python/2.7/site-packages/matplotlib/axes/_subplots.py", line 10, in <module>
> from matplotlib.axes._axes import Axes
> File "/Library/Python/2.7/site-packages/matplotlib/axes/_axes.py", line 22, in <module>
> import matplotlib.dates as _ # <-registers a date unit converter
> File "/Library/Python/2.7/site-packages/matplotlib/dates.py", line 126, in <module>
> from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
> File "/Library/Python/2.7/site-packages/dateutil/rrule.py", line 19, in <module>
> from six.moves import _thread
> ImportError: cannot import name _thread
>
>
> Do you have any idea as to what this could be?
>
> Thanks,
> Ruchika
> ----------------------------------------
> Dr Ruchika Nayyar,
> Post Doctoral Fellow for ATLAS Collaboration
> University of Arizona
> Arizona, USA.
> --------------------------------------------
>
> On Wed, Jun 1, 2016 at 11:45 AM, STEPHEN D SHANK <sshank at temple.edu> wrote:
> Just to note, anaconda also has it's own method of managing environments:
>
> On Wed, Jun 1, 2016 at 2:43 PM, Andrea Bravi <andrea.bravi at gmail.com> wrote:
>
> Hi guys,
>
>
> I recommend using https://virtualenv.pypa.io to solve those issues!
>
>
> Best regards,
>
> Andrea
>
>
> On Wednesday, 1 June 2016, Matthew Brett <matthew.brett at gmail.com> wrote:
> On Wed, Jun 1, 2016 at 11:17 AM, Sebastian Raschka
> <mail at sebastianraschka.com> wrote:
> >> I think you're using system Python on the Mac. I'd really strongly
> >> recommend against that, because system Python
> >
> > Yeah, but I think that the system Python doesn’t come with NumPy and SciPy installed on a Mac?
>
> That's the entire problem - system Python has its own private copy of
> numpy and scipy and matplotlib that are not in the usual sys.path
> places:
>
> $ /usr/bin/python -c 'import numpy; print(numpy.__file__)'
> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc
>
> Then, if you try to upgrade them with pip, the new packages are below
> the private copies in directory precedence, and the effect is that the
> upgrade is ignored.
>
> In effect, system Python is for the system, if you want to own your
> Python, you need to install another copy for yourself.
>
> Cheers,
>
> Matthew
> _______________________________________________
> 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
>
>
>
>
> --
>
> Stephen D. Shank, Ph. D.
> Department of Biology, Center for Computational Genetics and Genomics
> Temple University, Philadelphia, PA
> BioLife 106F
> sshank at temple.edu
>
> _______________________________________________
> 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