How to get apache beam for dataflow GCP on Python 3.x

You can now run Apache Beam on Python 3.5 (I tried both on Direct as well as DataFlow runner).apache-beam==2.11.0

when running it comes with warning:

UserWarning: Running the Apache Beam SDK on Python 3 is not yet fully supported. You may encounter buggy behavior or missing features.

I already noticed, beam.io.gcp.pubsub.ReadFromPubSub() is broken. Pushing messages to PubSub but the pipeline never reads the messages (trying on Direct Runner).

Hope with time things will improve.


See @VibhorJain 's answer, it is working now.


Currently there is NO way to use Python3 for apache-beam (you may write an adapter for it, but for sure meaningless).

The support of Python3.X is on going, please take a look on this apache-beam issue.

P.S. In the video, Python 3.5.2 is ONLY for the editor version, it is not the python running the apache-beam. Please be noticed, in the bash, Python 2.7 is running.