3
votes

I just started with the initial guide from apache beam documentation, looks like this particular pipeline import is no more available.

from apache_beam.options.pipeline_options import PipelineOptions

Reference: https://beam.apache.org/documentation/programming-guide/#pipeline

Error:


ImportError Traceback (most recent call last) in () ----> 1 from apache_beam.options.pipeline_options import PipelineOptions

**

ImportError: No module named options.pipeline_options

**

Any active apache beam python users ? Who knows what the actual import path is ?

2

2 Answers

2
votes

So looks like it got renamed/refactored to this module name:

from apache_beam.pipeline import PipelineOptions

Basically its apache_beam.pipeline instead of apache_beam.options.pipeline_options

And it works successfully !

Note: 2.7.13 is my python version

2
votes

Navigate to the Python Lib folder or the site-packages folder and verify the folder structure within apache_beam package.

If the folder structure is apache_beam\pipeline then your import statement should be from apache_beam.pipeline import *

Or better to use the targeted import statement as mentioned by @gnanagurus answer.