You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Gayathri Murali <ga...@gmail.com> on 2016/03/11 08:17:47 UTC

Python unit tests - Unable to ru it with Python 2.6 or 2.7

Hi all,

I am trying to run python unit tests. 

I currently have Python 2.6 and 2.7 installed. I installed unittest2 against both of them.

When I try to run /python/run-tests with Python 2.7 I get the following error : 

Please install unittest2 to test with Python 2.6 or earlier
Had test failures in pyspark.sql.tests with python2.6; see logs.

When I try to run /python/run-tests with Python 2.6 I get the following error: 

Traceback (most recent call last):
  File "./python/run-tests.py", line 42, in <module>
    from sparktestsupport.modules import all_modules  # noqa
  File "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18, in <module>
    from functools import total_ordering
ImportError: cannot import name total_ordering

total_ordering is a package that is available in 2.7. 

Can someone help?

Thanks
Gayathri
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: Python unit tests - Unable to ru it with Python 2.6 or 2.7

Posted by Gayathri Murali <ga...@gmail.com>.
Thanks Josh. I am able to run with Python 2.7 explicitly by specifying
--python-executables=python2.7. By default it checks only for Python2.6.

Thanks
Gayathri





On Fri, Mar 11, 2016 at 10:35 AM, Josh Rosen <jo...@databricks.com>
wrote:

> AFAIK we haven't actually broken 2.6 compatibility yet for PySpark itself,
> since Jenkins is still testing that configuration.
>
> I think the problem that you're seeing is that dev/run-tests /
> dev/run-tests-jenkins only work against Python 2.7+ right now. However,
> ./python/run-tests should be able to launch and run PySpark tests with
> Python 2.6. Try ./python/run-tests --help for more details.
>
> On Fri, Mar 11, 2016 at 10:31 AM Holden Karau <ho...@pigscanfly.ca>
> wrote:
>
>> So the run tests command allows you to specify the python version to test
>> again - maybe specify python2.7
>>
>> On Friday, March 11, 2016, Gayathri Murali <ga...@gmail.com>
>> wrote:
>>
>>> I do have 2.7 installed and unittest2 package available. I still see
>>> this error :
>>>
>>> Please install unittest2 to test with Python 2.6 or earlier
>>> Had test failures in pyspark.sql.tests with python2.6; see logs.
>>>
>>> Thanks
>>> Gayathri
>>>
>>>
>>>
>>> On Fri, Mar 11, 2016 at 10:07 AM, Davies Liu <da...@databricks.com>
>>> wrote:
>>>
>>>> Spark 2.0 is dropping the support for Python 2.6, it only work with
>>>> Python 2.7, and 3.4+
>>>>
>>>> On Thu, Mar 10, 2016 at 11:17 PM, Gayathri Murali
>>>> <ga...@gmail.com> wrote:
>>>> > Hi all,
>>>> >
>>>> > I am trying to run python unit tests.
>>>> >
>>>> > I currently have Python 2.6 and 2.7 installed. I installed unittest2
>>>> against both of them.
>>>> >
>>>> > When I try to run /python/run-tests with Python 2.7 I get the
>>>> following error :
>>>> >
>>>> > Please install unittest2 to test with Python 2.6 or earlier
>>>> > Had test failures in pyspark.sql.tests with python2.6; see logs.
>>>> >
>>>> > When I try to run /python/run-tests with Python 2.6 I get the
>>>> following error:
>>>> >
>>>> > Traceback (most recent call last):
>>>> >   File "./python/run-tests.py", line 42, in <module>
>>>> >     from sparktestsupport.modules import all_modules  # noqa
>>>> >   File
>>>> "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18,
>>>> in <module>
>>>> >     from functools import total_ordering
>>>> > ImportError: cannot import name total_ordering
>>>> >
>>>> > total_ordering is a package that is available in 2.7.
>>>> >
>>>> > Can someone help?
>>>> >
>>>> > Thanks
>>>> > Gayathri
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
>>>> > For additional commands, e-mail: user-help@spark.apache.org
>>>> >
>>>>
>>>
>>>
>>
>> --
>> Cell : 425-233-8271
>> Twitter: https://twitter.com/holdenkarau
>>
>>

Re: Python unit tests - Unable to ru it with Python 2.6 or 2.7

Posted by Josh Rosen <jo...@databricks.com>.
AFAIK we haven't actually broken 2.6 compatibility yet for PySpark itself,
since Jenkins is still testing that configuration.

I think the problem that you're seeing is that dev/run-tests /
dev/run-tests-jenkins only work against Python 2.7+ right now. However,
./python/run-tests should be able to launch and run PySpark tests with
Python 2.6. Try ./python/run-tests --help for more details.

On Fri, Mar 11, 2016 at 10:31 AM Holden Karau <ho...@pigscanfly.ca> wrote:

> So the run tests command allows you to specify the python version to test
> again - maybe specify python2.7
>
> On Friday, March 11, 2016, Gayathri Murali <ga...@gmail.com>
> wrote:
>
>> I do have 2.7 installed and unittest2 package available. I still see this
>> error :
>>
>> Please install unittest2 to test with Python 2.6 or earlier
>> Had test failures in pyspark.sql.tests with python2.6; see logs.
>>
>> Thanks
>> Gayathri
>>
>>
>>
>> On Fri, Mar 11, 2016 at 10:07 AM, Davies Liu <da...@databricks.com>
>> wrote:
>>
>>> Spark 2.0 is dropping the support for Python 2.6, it only work with
>>> Python 2.7, and 3.4+
>>>
>>> On Thu, Mar 10, 2016 at 11:17 PM, Gayathri Murali
>>> <ga...@gmail.com> wrote:
>>> > Hi all,
>>> >
>>> > I am trying to run python unit tests.
>>> >
>>> > I currently have Python 2.6 and 2.7 installed. I installed unittest2
>>> against both of them.
>>> >
>>> > When I try to run /python/run-tests with Python 2.7 I get the
>>> following error :
>>> >
>>> > Please install unittest2 to test with Python 2.6 or earlier
>>> > Had test failures in pyspark.sql.tests with python2.6; see logs.
>>> >
>>> > When I try to run /python/run-tests with Python 2.6 I get the
>>> following error:
>>> >
>>> > Traceback (most recent call last):
>>> >   File "./python/run-tests.py", line 42, in <module>
>>> >     from sparktestsupport.modules import all_modules  # noqa
>>> >   File
>>> "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18,
>>> in <module>
>>> >     from functools import total_ordering
>>> > ImportError: cannot import name total_ordering
>>> >
>>> > total_ordering is a package that is available in 2.7.
>>> >
>>> > Can someone help?
>>> >
>>> > Thanks
>>> > Gayathri
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
>>> > For additional commands, e-mail: user-help@spark.apache.org
>>> >
>>>
>>
>>
>
> --
> Cell : 425-233-8271
> Twitter: https://twitter.com/holdenkarau
>
>

Re: Python unit tests - Unable to ru it with Python 2.6 or 2.7

Posted by Holden Karau <ho...@pigscanfly.ca>.
So the run tests command allows you to specify the python version to test
again - maybe specify python2.7

On Friday, March 11, 2016, Gayathri Murali <ga...@gmail.com>
wrote:

> I do have 2.7 installed and unittest2 package available. I still see this
> error :
>
> Please install unittest2 to test with Python 2.6 or earlier
> Had test failures in pyspark.sql.tests with python2.6; see logs.
>
> Thanks
> Gayathri
>
>
>
> On Fri, Mar 11, 2016 at 10:07 AM, Davies Liu <davies@databricks.com
> <javascript:_e(%7B%7D,'cvml','davies@databricks.com');>> wrote:
>
>> Spark 2.0 is dropping the support for Python 2.6, it only work with
>> Python 2.7, and 3.4+
>>
>> On Thu, Mar 10, 2016 at 11:17 PM, Gayathri Murali
>> <gayathri.m.softie@gmail.com
>> <javascript:_e(%7B%7D,'cvml','gayathri.m.softie@gmail.com');>> wrote:
>> > Hi all,
>> >
>> > I am trying to run python unit tests.
>> >
>> > I currently have Python 2.6 and 2.7 installed. I installed unittest2
>> against both of them.
>> >
>> > When I try to run /python/run-tests with Python 2.7 I get the following
>> error :
>> >
>> > Please install unittest2 to test with Python 2.6 or earlier
>> > Had test failures in pyspark.sql.tests with python2.6; see logs.
>> >
>> > When I try to run /python/run-tests with Python 2.6 I get the following
>> error:
>> >
>> > Traceback (most recent call last):
>> >   File "./python/run-tests.py", line 42, in <module>
>> >     from sparktestsupport.modules import all_modules  # noqa
>> >   File
>> "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18,
>> in <module>
>> >     from functools import total_ordering
>> > ImportError: cannot import name total_ordering
>> >
>> > total_ordering is a package that is available in 2.7.
>> >
>> > Can someone help?
>> >
>> > Thanks
>> > Gayathri
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
>> <javascript:_e(%7B%7D,'cvml','user-unsubscribe@spark.apache.org');>
>> > For additional commands, e-mail: user-help@spark.apache.org
>> <javascript:_e(%7B%7D,'cvml','user-help@spark.apache.org');>
>> >
>>
>
>

-- 
Cell : 425-233-8271
Twitter: https://twitter.com/holdenkarau

Re: Python unit tests - Unable to ru it with Python 2.6 or 2.7

Posted by Gayathri Murali <ga...@gmail.com>.
I do have 2.7 installed and unittest2 package available. I still see this
error :

Please install unittest2 to test with Python 2.6 or earlier
Had test failures in pyspark.sql.tests with python2.6; see logs.

Thanks
Gayathri



On Fri, Mar 11, 2016 at 10:07 AM, Davies Liu <da...@databricks.com> wrote:

> Spark 2.0 is dropping the support for Python 2.6, it only work with
> Python 2.7, and 3.4+
>
> On Thu, Mar 10, 2016 at 11:17 PM, Gayathri Murali
> <ga...@gmail.com> wrote:
> > Hi all,
> >
> > I am trying to run python unit tests.
> >
> > I currently have Python 2.6 and 2.7 installed. I installed unittest2
> against both of them.
> >
> > When I try to run /python/run-tests with Python 2.7 I get the following
> error :
> >
> > Please install unittest2 to test with Python 2.6 or earlier
> > Had test failures in pyspark.sql.tests with python2.6; see logs.
> >
> > When I try to run /python/run-tests with Python 2.6 I get the following
> error:
> >
> > Traceback (most recent call last):
> >   File "./python/run-tests.py", line 42, in <module>
> >     from sparktestsupport.modules import all_modules  # noqa
> >   File
> "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18,
> in <module>
> >     from functools import total_ordering
> > ImportError: cannot import name total_ordering
> >
> > total_ordering is a package that is available in 2.7.
> >
> > Can someone help?
> >
> > Thanks
> > Gayathri
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> > For additional commands, e-mail: user-help@spark.apache.org
> >
>

Re: Python unit tests - Unable to ru it with Python 2.6 or 2.7

Posted by Davies Liu <da...@databricks.com>.
Spark 2.0 is dropping the support for Python 2.6, it only work with
Python 2.7, and 3.4+

On Thu, Mar 10, 2016 at 11:17 PM, Gayathri Murali
<ga...@gmail.com> wrote:
> Hi all,
>
> I am trying to run python unit tests.
>
> I currently have Python 2.6 and 2.7 installed. I installed unittest2 against both of them.
>
> When I try to run /python/run-tests with Python 2.7 I get the following error :
>
> Please install unittest2 to test with Python 2.6 or earlier
> Had test failures in pyspark.sql.tests with python2.6; see logs.
>
> When I try to run /python/run-tests with Python 2.6 I get the following error:
>
> Traceback (most recent call last):
>   File "./python/run-tests.py", line 42, in <module>
>     from sparktestsupport.modules import all_modules  # noqa
>   File "/Users/gayathri/spark/python/../dev/sparktestsupport/modules.py", line 18, in <module>
>     from functools import total_ordering
> ImportError: cannot import name total_ordering
>
> total_ordering is a package that is available in 2.7.
>
> Can someone help?
>
> Thanks
> Gayathri
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org