beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Kiss (JIRA)" <>
Subject [jira] [Created] (BEAM-1546) Specify exact version for Python in the SDK
Date Fri, 24 Feb 2017 13:27:44 GMT
Tibor Kiss created BEAM-1546:

             Summary: Specify exact version for Python in the SDK
                 Key: BEAM-1546
             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:
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
    if sys.version_info.major != 2:
AttributeError: 'tuple' object has no attribute 'major'

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