Hi Harold,

Only the current development version, and the upcoming release, has,
as of recently, support for Python 3.  Even so, it won't be easy to
support 3.2, we just aim for 3.3 at the moment.
This being said, I have no idea what causes this specific error. That
line seems unchanged in the current master.

Yours,
Vlad

On Fri, Jul 26, 2013 at 9:02 PM, Harold Nguyen <[email protected]> wrote:
> Hi again,
>
> After updating scikit-learn (I think I was running that script from the
> newest version of scikit-learn, while my installed version was older), I get
> the following error:
>
> $ python document_classification_20newsgroups.py
> Traceback (most recent call last):
>   File "document_classification_20newsgroups.py", line 34, in <module>
>     from sklearn.datasets import fetch_20newsgroups
>   File
> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/__init__.py",
> line 23, in <module>
>     from .twenty_newsgroups import fetch_20newsgroups
>   File
> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/twenty_newsgroups.py",
> line 105
>     _before, _blankline, after = text.partition(u'\n\n')
>                                                       ^
> SyntaxError: invalid syntax
> harold:examples admin$ python document_classification_20newsgroups.py
> Traceback (most recent call last):
>   File "document_classification_20newsgroups.py", line 34, in <module>
>     from sklearn.datasets import fetch_20newsgroups
>   File
> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/__init__.py",
> line 23, in <module>
>     from .twenty_newsgroups import fetch_20newsgroups
>   File
> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/twenty_newsgroups.py",
> line 105
>     _before, _blankline, after = text.partition(u'\n\n')
>                                                       ^
> SyntaxError: invalid syntax
>
> I guess scikit-learn doesn't play nice with Python 3.2 ?
>
> Harold
>
>
>
> On Fri, Jul 26, 2013 at 11:51 AM, Harold Nguyen <[email protected]> wrote:
>>
>> Hi experts,
>>
>> I was going through the example here:
>>
>> http://scikit-learn.org/stable/auto_examples/document_classification_20newsgroups.html#example-document-classification-20newsgroups-py
>>
>> But when I run, I get the following error message:
>>
>> $ python document_classification_20newsgroups.py --top20
>>
>> ...
>> Loading 20 newsgroups dataset for categories:
>> ['alt.atheism', 'talk.religion.misc', 'comp.graphics', 'sci.space']
>> Traceback (most recent call last):
>>   File "document_classification_20newsgroups.py", line 116, in <module>
>>     remove=remove)
>> TypeError: fetch_20newsgroups() got an unexpected keyword argument
>> 'remove'
>>
>>
>> Am I doing something wrong ? Thanks for any help!
>>
>> Harold
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to