{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/7522","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/7522/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/7522/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/7522/events","html_url":"https://github.com/pytorch/pytorch/issues/7522","id":322524098,"number":7522,"title":"[ONNX] cannot import name X (Caffe2)","user":{"login":"PauliusPoc","id":31746944,"avatar_url":"https://avatars3.githubusercontent.com/u/31746944?v=4","gravatar_id":"","url":"https://api.github.com/users/PauliusPoc","html_url":"https://github.com/PauliusPoc","followers_url":"https://api.github.com/users/PauliusPoc/followers","following_url":"https://api.github.com/users/PauliusPoc/following{/other_user}","gists_url":"https://api.github.com/users/PauliusPoc/gists{/gist_id}","starred_url":"https://api.github.com/users/PauliusPoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauliusPoc/subscriptions","organizations_url":"https://api.github.com/users/PauliusPoc/orgs","repos_url":"https://api.github.com/users/PauliusPoc/repos","events_url":"https://api.github.com/users/PauliusPoc/events{/privacy}","received_events_url":"https://api.github.com/users/PauliusPoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-12T16:24:10Z","updated_at":"2018-05-14T13:45:01Z","closed_at":null,"author_association":"NONE","body":"System info:\r\nUbuntu 16.04\r\nPython 3.6.5 in `anaconda3/envs/testcaffe/bin/python3`\r\nAnaconda3 4.5.2\r\nCPU only\r\n\r\nI installed Caffe2 by `conda install -c caffe2 caffe2`\r\nfor python to find onnx i set the PYTHONPATH to `/home/username/WorkStuff/anaconda3/envs/testcaffe/lib/python3.6/site-packages/caffe2/python`\r\n\r\nimporting onnx `import onnx` in python works fine, but when i tried to run converter script provided in  [tutorial](https://github.com/onnx/tutorials/blob/master/tutorials/Caffe2OnnxExport.ipynb) i get this:\r\n```\r\n  File \"converter.py\", line 2, in <module>\r\n    import caffe2.python.onnx.frontend\r\n  File \"/home/username/WorkStuff/anaconda3/envs/testcaffe/lib/python3.6/site-packages/caffe2/python/onnx/frontend.py\", line 22, in <module>\r\n    from onnx import (defs, checker, helper, numpy_helper, mapping,\r\n  File \"/home/username/WorkStuff/anaconda3/envs/testcaffe/lib/python3.6/site-packages/caffe2/python/onnx/helper.py\", line 9, in <module>\r\n    from onnx.backend.base import namedtupledict\r\n  File \"/home/username/WorkStuff/anaconda3/envs/testcaffe/lib/python3.6/site-packages/caffe2/python/onnx/backend.py\", line 33, in <module>\r\n    from onnx import checker, GraphProto, TensorProto, AttributeProto, ModelProto\r\nImportError: cannot import name 'checker'\r\n```\r\n\r\nchecker.h is located in `/home/username/WorkStuff/anaconda3/envs/testcaffe/include/onnx`\r\nalthough there are no ...Proto files in my testcaffe directory\r\n\r\nif i just run Python and write import onnx.checker it returns `ModuleNotFoundError: No module named 'onnx.checker'`\r\n\r\nseems like onnx cant import any of its modules\r\n\r\nIs there anything i simply miss or don't understand?\r\nThank you for your help\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/388821717","html_url":"https://github.com/pytorch/pytorch/issues/7522#issuecomment-388821717","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/7522","id":388821717,"user":{"login":"AugustinasMK","id":24233134,"avatar_url":"https://avatars0.githubusercontent.com/u/24233134?v=4","gravatar_id":"","url":"https://api.github.com/users/AugustinasMK","html_url":"https://github.com/AugustinasMK","followers_url":"https://api.github.com/users/AugustinasMK/followers","following_url":"https://api.github.com/users/AugustinasMK/following{/other_user}","gists_url":"https://api.github.com/users/AugustinasMK/gists{/gist_id}","starred_url":"https://api.github.com/users/AugustinasMK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AugustinasMK/subscriptions","organizations_url":"https://api.github.com/users/AugustinasMK/orgs","repos_url":"https://api.github.com/users/AugustinasMK/repos","events_url":"https://api.github.com/users/AugustinasMK/events{/privacy}","received_events_url":"https://api.github.com/users/AugustinasMK/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T13:45:01Z","updated_at":"2018-05-14T13:45:01Z","author_association":"NONE","body":"I have the same problem. Any solution to this?"}}
{"actor":{"display_login":"AugustinasMK"}}