Creating a pybind wrapper

I am trying to create bindings and successfully so.

However, when importing I face the following error:

ImportError: dlopen(/anaconda3/envs/reinforcement/lib/python3.5/site-packages/dqn_cpp-0.0.0-py3.5-macosx-10.6-x86_64.egg/dqn.cpython-35m-darwin.so, 2): 
Symbol not found: __ZN3c1019UndefinedTensorImpl10_singletonE

I have used a library (ALE) in my class and was wondering how to include that for creating the bindings.

ImportError: dlopen(/anaconda3/envs/reinforcement/lib/python3.5/site-packages/dqn_cpp-0.0.0-py3.5-macosx-10.6-x86_64.egg/dqn.cpython-35m-darwin.so, 2): 
Symbol not found: __ZN12ALEInterface10reset_gameEv
  Referenced from: /anaconda3/envs/reinforcement/lib/python3.5/site-packages/dqn_cpp-0.0.0-py3.5-macosx-10.6-x86_64.egg/dqn.cpython-35m-darwin.so
  Expected in: flat namespace
 in anaconda3/envs/reinforcement/lib/python3.5/site-packages/dqn_cpp-0.0.0-py3.5-macosx-10.6-x86_64.egg/dqn.cpython-35m-darwin.so

The ALEInterface refers to the shared library. I am not sure how to make a binding in such a scenario.

Did you load PyTorch before you did?
You might have to manually link to torch and / or c10.
On Linux the default seems to be to not explicitly link to torch but rely on “import torch” having made the symbols globally visible.

Best regards

Thomas

I linked and now I am having errors with one of the libraries that I am using.

I have used the import statement and still does not work.

For what its worth, I am working on mac.