beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-1546) Specify exact version for Python in the SDK
Date Fri, 24 Feb 2017 15:17:44 GMT


ASF GitHub Bot commented on BEAM-1546:

GitHub user tibkiss opened a pull request:

    [BEAM-1546] Specify exact version for Python in the SDK


You can merge this pull request into a Git repository by running:

    $ git pull BEAM-1546

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2097
commit a836e40f3ed7247be5a06000aa7b556fd5a077c6
Author: Tibor Kiss <>
Date:   2017-02-24T13:30:54Z

    [BEAM-1546] Specify exact version for Python in the SDK


> Specify exact version for Python in the SDK
> -------------------------------------------
>                 Key: BEAM-1546
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py
>    Affects Versions: 0.6.0
>            Reporter: Tibor Kiss
>            Assignee: Ahmet Altay
>            Priority: Trivial
> Python SDK currently supports Python2.7 only.
> There are two shortcomings with the version check/enforcement:
> 1) apache_beam package's init uses named component attribute (sys.version_info.*major*)
to bail if unsupported Python is used.
> The named component based version was introduced in Python 2.7 thus
> if one uses older Python version (e.g. 2.6) an AttributeError will be thrown:
> {noformat}
> Traceback (most recent call last):
>   File "apache_beam/examples/complete/", line 22, in <module>
>     import apache_beam as beam
>   File "/Users/tiborkiss/workspace/beam/sdks/python/apache_beam/", line 69,
in <module>
>     if sys.version_info.major != 2:
> AttributeError: 'tuple' object has no attribute 'major'
> {noformat}
> To fix this problem the {{sys.version_info.major}} should be replaced by {{sys.version_info[0]}}.
> 2) The Python interpreter & pip definition in pom.xml defines that {{python2}} &
{{pip2}} should be used. Users with multiple Python interpreters installed might end up having
python2 and pip2 pointing to their 2.6 installation. Calling out {{python2.7}} and {{pip2.7}}
explicitly would help to resolve this problem.

This message was sent by Atlassian JIRA

View raw message