facebookresearch / Clinical-Trial-Parser

Library for converting clinical trial eligibility criteria to a machine-readable format.
Apache License 2.0
163 stars 58 forks source link

ImportError: cannot import name 'metanet_pb2' from partially initialized module 'caffe2.proto' #22

Closed bhomass closed 2 years ago

bhomass commented 2 years ago

I have been trying to get this lib to work for three days. I have tried python 3.5, 3.6, 3.7, and 3.10. I have tried installing pytext using conda, pip, and build from source.

It all ends up with the error in the issue title. from caffe2.proto import caffe2_pb2 File "/data/anaconda3/envs/pytext/lib/python3.8/site-packages/caffe2/proto/init.py", line 15, in from caffe2.proto import caffe2_pb2, metanet_pb2, torch_pb2 ImportError: cannot import name 'metanet_pb2' from partially initialized module 'caffe2.proto'

googling ends up in dead trails where people continue to see the same problem, but previously raised tickets are closed.

Please give indication how to get past this step?

salkola commented 2 years ago

I use Python 3.7.6. I have not seen this error before. Only advice I can give is to do a clean install by deleting previous packages. Maybe use a new Python environment to install everything?