Setting up source code for development contribution error

I am currently trying to setup PyTorch on my local machine to develop locally for contribution to the project. I have an Anaconda environment setup and other recommended dependencies but when I run the command “Python3 setup.py develop” it produces too many errors and does not complete. I have provided the end of the snippet from the command line. Help would be greatly appreciated.

/Users/mitchellduffy/Desktop/eecs-481/torch/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.pb.h:2041:46: error: non-virtual member function marked 'final' hides virtual member function
  inline StringStringEntryProto* New() const final {
                                             ^
/usr/local/include/google/protobuf/message.h:253:12: note: hidden overloaded virtual function 'google::protobuf::Message::New' declared here: different number of parameters (1 vs 0)
  Message* New(Arena* arena) const override = 0;
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
[530/1100] Building CXX object caffe2/...pu/GridSamplerKernel.cpp.DEFAULT.cpp.o
ninja: build stopped: subcommand failed.

The end of the error message is usually not helpful as the initial error would trigger these, so check the first failure and post it here.

This is the first error that is generated:

/Users/mitchellduffy/Desktop/eecs-481/torch/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
 ^
/Users/mitchellduffy/Desktop/eecs-481/torch/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
 ^
/Users/mitchellduffy/Desktop/eecs-481/torch/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
 ^

Your system protoc might be incompatible and you could use BUILD_CUSTOM_PROTOBUF=ON to build with the protobuf from third_party/protobuf.