gnanagurus
gnanagurus

Reputation: 903

No module named options.pipeline_options

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 ?

Upvotes: 3

Views: 1949

Answers (2)

kvivek
kvivek

Reputation: 3481

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.

Upvotes: 2

gnanagurus
gnanagurus

Reputation: 903

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

Upvotes: 2

Related Questions