waymo-open-dataset icon indicating copy to clipboard operation
waymo-open-dataset copied to clipboard

ImportError: cannot import name 'dataset_pb2'

Open Rosywind opened this issue 6 years ago • 45 comments

When I run "from waymo_open_dataset import dataset_pb2 as open_dataset", there would report an error "ImportError: cannot import name 'dataset_pb2'". What is the reason for this? What is the 'dataset_pb2'? Looking forward to your reply!

Rosywind avatar Oct 18 '19 09:10 Rosywind

Does pip3 install waymo-open-dataset==1.0.1

work for you?

If not, what is your python version, tensorflow version?

peisun1115 avatar Oct 18 '19 09:10 peisun1115

Have the same issue. The pip install does not work, it shows the error:

ERROR: Could not find a version that satisfies the requirement waymo-open-dataset==1.0.1 (from versions: none) ERROR: No matching distribution found for waymo-open-dataset==1.0.1

Python Version: 3.6.5 Tensorflow Version: 1.9

Thanks in advance.

yklose avatar Oct 19 '19 15:10 yklose

we require tensorflow 1.14 or higher.

peisun1115 avatar Oct 19 '19 22:10 peisun1115

Hi, I also met the same error"ERROR: Could not find a version that satisfies the requirement waymo-open-dataset (from versions: none) ERROR: No matching distribution found for waymo-open-dataset" my pip version is 19.3.1. Do I need anything else? I think tensorflow is not needed for now. Thank you very much.

Gus-Guo avatar Oct 20 '19 16:10 Gus-Guo

The pre-built pip package requires tensorflow 1.14.0. @Gus-Guo, do you prefer to not installing tf?

peisun1115 avatar Oct 20 '19 16:10 peisun1115

Another way to do it: https://github.com/waymo-research/waymo-open-dataset/issues/35

Alternatively, you can also copy the files after compiling locally:

waymo-od is the directory you downloaded the source: cp waymo-od/bazel-genfiles/waymo_open_dataset/label_pb2.py waymo-od/waymo_open_dataset/label_pb2.py cp waymo-od/bazel-genfiles/waymo_open_dataset/dataset_pb2.py waymo-od/waymo_open_dataset/dataset_pb2.py

peisun1115 avatar Oct 20 '19 16:10 peisun1115

Thank you, #35 solved my problem!

yklose avatar Oct 20 '19 21:10 yklose

The pre-built pip package requires tensorflow 1.14.0. @Gus-Guo, do you prefer to not installing tf?

Thank you very much. I change the python verison to from 3.7 to 3.6 and it works.

Gus-Guo avatar Oct 21 '19 04:10 Gus-Guo

Does pip3 install waymo-open-dataset==1.0.1

work for you?

If not, what is your python version, tensorflow version?

Yes, the log had show "Successfully installed ... waymo-open-dataset-1.0.1 ...". I found the problem is about the installation directory. Thank you very much.

Rosywind avatar Oct 23 '19 01:10 Rosywind

Hello @peisun1115, I am working on a project which uses your dataset. Currently I have windows 10 and I am using Jupyter Notebook to import your dataset. I am facing hardship in trying to install the waymo_open_dataset using pip3. I have Python Version = 3.6.8 Tensorflow version = 1.14.0

I am geting the following error. image

I tried a workaround by cloning your waymo-open-dataset and then changing the directory to it and all imports started working out but then in frame_utils you are using dataset_pb2 which I do not have in the cloned git repo so it is throwing error.

Can you guys please help me out in either instaling the waymo-open-dataset or importing the dataset_pb2. Also, is it possible to run everything on jupyter notebook on windows 10 or is it a requirement to have linux OS??

abhishupatel avatar Oct 25 '19 22:10 abhishupatel

pip3 install waymo-open-dataset==1.0.1 --no-deps if you don't want waymo to clobber your tensorflow install (or lack thereof)

pwais avatar Nov 06 '19 22:11 pwais

Hello Guys, my name is William, i'm an student at Sherbrooke University in Quebec and my research project is related to autonomous drivingn so i will be using Waymo-open-dataset. I was trying to install it by following the guide: https://colab.research.google.com/github/waymo-research/waymo-open-dataset/blob/v1.0.1/tutorial/tutorial.ipynb#scrollTo=hDQ1DPqwdfNW but it does not work at all, it give the same error that abhishupatel has. Is there any other way to install it? I have the same python and tensorflow version than abhishupatel has. Could anybody help me with this?

WilliamCabrera avatar Jan 10 '20 22:01 WilliamCabrera

@WilliamCabrera

What is the error you are seeing?

If you just want to get started without compiling, try

pip3 install upgrade --pip pip3 install waymo-open-dataset-tf-2-0-0==1.0.1 --user

https://github.com/waymo-research/waymo-open-dataset/blob/master/docs/quick_start.md

peisun1115 avatar Jan 11 '20 00:01 peisun1115

Hi Pei Sun, Thank you very much for your answer but i'm still getting the same error:

cmd logs:

(yolo_cpu) D:\PersonalProjetcs\Tensorflow>pip3 install waymo-open-dataset-tf-2-0-0==1.0.1 --user ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

(yolo_cpu) D:\PersonalProjetcs\Tensorflow>pip3 install waymo-open-dataset-tf-2-0-0==1.0.1 ERROR: Could not find a version that satisfies the requirement waymo-open-dataset-tf-2-0-0==1.0.1 (from versions: none) ERROR: No matching distribution found for waymo-open-dataset-tf-2-0-0==1.0.1

El vie., 10 ene. 2020 a las 19:48, Pei Sun ([email protected]) escribió:

@WilliamCabrera https://github.com/WilliamCabrera

What is the error you are seeing?

If you just want to get started without compiling, try

pip3 install upgrade --pip pip3 install waymo-open-dataset-tf-2-0-0==1.0.1 --user

https://github.com/waymo-research/waymo-open-dataset/blob/master/docs/quick_start.md

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/waymo-research/waymo-open-dataset/issues/48?email_source=notifications&email_token=ABPXMX6KFNQBMGSB5RNZ6DTQ5EJOTA5CNFSM4JCESJUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIVUBWY#issuecomment-573259995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXMXYIUEIXSDKCC73RGB3Q5EJOTANCNFSM4JCESJUA .

WilliamCabrera avatar Jan 11 '20 02:01 WilliamCabrera

@WilliamCabrera Ah, you are using windows.

That is not officially supported for now. Either use a linux machine or use a docker container or just copy the code you need from this repo for your own purpose.

peisun1115 avatar Jan 11 '20 03:01 peisun1115

Hi Pei Sun,

Do you know where can i find this on the python code: dataset_pb2? according to the documentation that is the way of opening a frame file.

FILENAME = '/content/waymo-od/tutorial/frames' dataset = tf.data.TFRecordDataset(FILENAME, compression_type='') for data in dataset: frame = open_dataset.Frame() frame.ParseFromString(bytearray(data.numpy())) break Thanks a lot for your help i really appreciate it Pei Sun.

Regards, William

El vie., 10 ene. 2020 a las 22:10, Pei Sun ([email protected]) escribió:

@WilliamCabrera https://github.com/WilliamCabrera Ah, you are using windows.

That is not officially supported for now. Either use a linux machine or use a docker container or just copy the code you need from this repo for your own purpose.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/waymo-research/waymo-open-dataset/issues/48?email_source=notifications&email_token=ABPXMX3VK3TPBYPGFE7Q2PLQ5E2DTA5CNFSM4JCESJUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIVXUCI#issuecomment-573274633, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXMXZUMVOJR5J7GBIBEWLQ5E2DTANCNFSM4JCESJUA .

WilliamCabrera avatar Jan 11 '20 16:01 WilliamCabrera

@WilliamCabrera

You can generate that on your own with protoc.

Alternatively, generate that in the docker container we provide here by running bazel build.

Or just use this which is contributed by the community. This is not officially supported and it can be out of date.

peisun1115 avatar Jan 11 '20 20:01 peisun1115

Hello Pei Sun,

I finally run the waymo demo scripts and i want to thank you for your help. I would like to ask you something related to the format of the tfrecord files.

1 tfrecord(800mb) = 5 frames(5 cameras) + lidar points ?

I tried to run a sequence but i noticed that the next tfrecord file is not the next step in the sequence, i mean it is an image of something completely different. I loaded the two tfrecord files i that i marked on the screenshot i attached in this email and the are completely different . I would like to know if it is possible with waymo dataset to load a set of tfrecords where each tfrecords represents the next frame in a video sequence, so i could try to simulate a real-time detection over a video.

Kind regards, William

El sáb., 11 ene. 2020 a las 15:55, Pei Sun ([email protected]) escribió:

@WilliamCabrera https://github.com/WilliamCabrera

You can generate that on your own with protoc http://google.github.io/proto-lens/installing-protoc.html.

Alternatively, generate that in the docker container we provide here by running bazel build.

Or just use this https://github.com/gdlg/simple-waymo-open-dataset-reader/tree/master/simple_waymo_open_dataset_reader which is contributed by the community. This is not officially supported and it can be out of date.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/waymo-research/waymo-open-dataset/issues/48?email_source=notifications&email_token=ABPXMX5PGHHOCDONXIV2SULQ5IW3RA5CNFSM4JCESJUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWK5KI#issuecomment-573353641, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXMX5X3RQZKTMRFGN2CETQ5IW3RANCNFSM4JCESJUA .

WilliamCabrera avatar Apr 09 '20 22:04 WilliamCabrera

They are consecutive. Did you check whether they are from the same camera (by checking the camera name)? Did you check their frame.timestamp_micros to see whether they are approximately 0.1 sec apart?

peisun1115 avatar Apr 09 '20 22:04 peisun1115

this is the second image. There are sorted according to the number on the tfreccord file name. I did not check the frame.timestamp_micros since it says invalid date when i tried to check the date but load the next(3rd file) with same camera and it give another image also different.

El jue., 9 abr. 2020 a las 18:21, Pei Sun ([email protected]) escribió:

They are consecutive. Did you check whether they are from the same camera (by checking the camera name)? Did you check their frame.timestamp_micros to see whether they are approximately 0.1 sec apart?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/waymo-research/waymo-open-dataset/issues/48#issuecomment-611781425, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXMXYBYV3YLP6L4PVU6DDRLZC7JANCNFSM4JCESJUA .

WilliamCabrera avatar Apr 09 '20 23:04 WilliamCabrera

@Gus-Guo I had the same problem: the waymo-open-dataset package does not have a wheel for python 3.7. If you instead install the package waymo-open-dataset-tf-2-1-0 as described in the "quick start" page, there is a wheel for python 3.7.

(A list of versions can be found in Pei Sun's pypi profile: https://pypi.org/user/peis/ )

jvlmdr avatar Apr 14 '20 13:04 jvlmdr

@WilliamCabrera I cannot see the images in your replies.

@jvlmdr we have updated our quick start. https://github.com/waymo-research/waymo-open-dataset/blob/master/docs/quick_start.md#use-pre-compiled-pippip3-packages

peisun1115 avatar Apr 14 '20 17:04 peisun1115

For anyone who is just playing with the data on MacOS (thus cannot just use pip3 install), as of May 17, 2020, to make this work all you need to put the two files from here into the directory waymo_open_dataset. This way, the imports will be able to find dataset_pb2 as per the colab tutorial.

As peisun1115 noted above, this could be outdated in the future.

monghimng avatar May 18 '20 05:05 monghimng

Does pip3 install waymo-open-dataset==1.0.1 work for you? If not, what is your python version, tensorflow version?

Yes, the log had show "Successfully installed ... waymo-open-dataset-1.0.1 ...". I found the problem is about the installation directory. Thank you very much.

hello, what does _the problem is about the installation directory_mean? i got the same problem as yours. i have tried: -python 3.6 -tensorflow 2.1.0 and -python 3.6 -tensorflow 1.14.0 but neither nor woks for me. please help.

hughlee815 avatar Jul 20 '20 09:07 hughlee815

Does pip3 install waymo-open-dataset==1.0.1 work for you? If not, what is your python version, tensorflow version?

Yes, the log had show "Successfully installed ... waymo-open-dataset-1.0.1 ...". I found the problem is about the installation directory. Thank you very much.

hello, what does _the problem is about the installation directory_mean? i got the same problem as yours. i have tried: -python 3.6 -tensorflow 2.1.0 and -python 3.6 -tensorflow 1.14.0 but neither nor woks for me. please help.

Did you figure it out I am having the same issue on Windows Conda Python 3.6 and Tensorflow 2.1

praveenphatate avatar Nov 29 '20 01:11 praveenphatate

Hello Pei Sun, could you please help me find out how to access the 3D bounding for each image? I locked on the Frame object but i did not find anything.

Regards, William

El jue, 9 abr 2020 a las 18:21, Pei Sun ([email protected]) escribió:

They are consecutive. Did you check whether they are from the same camera (by checking the camera name)? Did you check their frame.timestamp_micros to see whether they are approximately 0.1 sec apart?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/waymo-research/waymo-open-dataset/issues/48#issuecomment-611781425, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXMXYBYV3YLP6L4PVU6DDRLZC7JANCNFSM4JCESJUA .

WilliamCabrera avatar Dec 21 '20 22:12 WilliamCabrera

Hi there, I am unable to install Waymo dataset using !pip3 install waymo-open-dataset-tf-2-1-0==1.2.0. My python version is 3.7.6 and my Tensorflow version is 2.1.0, which I believe are sufficient.

The error I got is: ERROR: Could not find a version that satisfies the requirement waymo-open-dataset-tf-2-1-0==1.2.0 ERROR: No matching distribution found for waymo-open-dataset-tf-2-1-0==1.2.0

Does anyone know what might caused this? Thanks in advance. Screen Shot 2021-03-13 at 6 16 15 pm

ZhaohanJackWang avatar Mar 13 '21 07:03 ZhaohanJackWang

Try 1.3.0?

peisun1115 avatar Mar 13 '21 07:03 peisun1115

Hi Pei Sun, I tried 1.3.0, but still not working. The error is: ERROR: Could not find a version that satisfies the requirement waymo-open-dataset-tf-2-1-0==1.3.0 ERROR: No matching distribution found for waymo-open-dataset-tf-2-1-0==1.3.0

ZhaohanJackWang avatar Mar 13 '21 07:03 ZhaohanJackWang

Consider updating your pip?

peisun1115 avatar Mar 13 '21 07:03 peisun1115