Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataset_pb2 not cannot be imported #35

Closed
SagnikD95 opened this issue Sep 13, 2019 · 14 comments
Closed

dataset_pb2 not cannot be imported #35

SagnikD95 opened this issue Sep 13, 2019 · 14 comments

Comments

@SagnikD95
Copy link

After succesfully downloading all the dependencies, I tried running the test program of your colab on my local machine setup, but it cannot import dataset_pb2 because it does not exist in waymo-open-dataset.

Also running pip3 install waymo-open-dataset returns a "no matching distribution found"

@peisun1115
Copy link
Contributor

  1. Try to run:
    pip3 install --upgrade pip

manylinux pip package needs a recent pip version

(we only support python2.7, python3.5, python3.6)

  1. If you have a different python version or an os not supported, try to build the pip package on your own. something like:

export PYTHON_VERSION=3 && ./pip_pkg_scripts/build.sh

@SagnikD95
Copy link
Author

SagnikD95 commented Sep 16, 2019 via email

@peisun1115
Copy link
Contributor

did you install pip package output by build.sh? something like:
pip (or pip3) install ${WHEEL_FILE} --user

note that if you do not install the pip package, it can also work. but you need to copy the proto generated files to waymo_open_dataset dir.

See the tutorial
https://github.com/waymo-research/waymo-open-dataset/blob/r1.0/tutorial/tutorial.ipynb

@SagnikD95
Copy link
Author

SagnikD95 commented Sep 16, 2019 via email

@peisun1115
Copy link
Contributor

peisun1115 commented Sep 16, 2019

Can you copy/paste the error msg and all the commands you used?

  • make sure you have installed the package.

@SagnikD95
Copy link
Author

SagnikD95 commented Sep 16, 2019 via email

@peisun1115
Copy link
Contributor

  1. You cannot install waymo-open-dataset because you cannot upgrade your pip.

  2. You did not install the pip package after './pip_pkg_scripts/build.sh'. You need to do something like
    pip3 install $YOUR_PIP_PACKAGE_BUILT_LOCALLY

@peisun1115
Copy link
Contributor

Is this resolved?

@turboxin
Copy link

@SagnikD95 you need to install protobuf and run protoc ./waymo_open-dataset/dataset.proto --python_out=.

@peisun1115
Copy link
Contributor

You can also copy the files generated by bazel directly though i think it is better to use the pip package.

@khsrhhh
Copy link

khsrhhh commented Sep 30, 2019

I had same issue, and I referenced @turboxin 's comment.

Actually 2 lines had a problem to compile.
=>
from waymo_open_dataset.utils import frame_utils
from waymo_open_dataset import dataset_pb2 as open_dataset

and I ran commands on terminal
=>
$ protoc ./waymo_open_dataset/dataset.proto -- python_out=.
$ protoc ./waymo_open_dataset/label.proto -- python_out=.

After ran them, change directory to waymo_open_dataset(master)/waymo_open_dataset
Now, you can see dataset_pb2.py and label_pb2.py files exist.

@peisun1115
Copy link
Contributor

  1. Did you install from the pre-compiled pip package?

  2. If answer to 1 is no, then yes, you will need to copy the proto generated files. Bazel generates that automatically for you. It locates at bazel-genfiles/waymo_open_dataset/

@SagnikD95
Copy link
Author

@SagnikD95 you need to install protobuf and run protoc ./waymo_open-dataset/dataset.proto --python_out-.

Thanks a ton. Worked like a charm!

@SagnikD95
Copy link
Author

I had same issue, and I referenced @turboxin 's comment.

Actually 2 lines had a problem to compile.
=>
from waymo_open_dataset.utils import frame_utils from waymo_open_dataset import dataset_pb2 as open_dataset

and I ran commands on terminal
=>
$ protoc ./waymo_open_dataset/dataset.proto -- python_out=. $ protoc ./waymo_open_dataset/label.proto -- python_out=.

After ran them, change directory to waymo_open_dataset(master)/waymo_open_dataset
Now, you can see dataset_pb2.py and label_pb2.py files exist.

Yes it worked. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants