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

when i try to run v0.14.0 from source code, it raise ImportError. #4

Closed
KingArtherTT opened this issue Feb 18, 2022 · 1 comment
Closed

Comments

@KingArtherTT
Copy link

KingArtherTT commented Feb 18, 2022

I clone the source code from github, then i want to run the openpifpaf/src/openpifpaf/predict.py file.And it raise error.I tracked down the issue and found that the error came from cpp_extension.register_ops()

extfinder = importlib.machinery.FileFinder(lib_dir, loader_details)
ext_specs = extfinder.find_spec("_cpp")
if ext_specs is None:
raise ImportError

It needs some openpifpaf._cpp files where i found in setup.py.
I want to run from the source code, and i do not know how to build this openpifpaf._cpp file,please help!!

@KingArtherTT
Copy link
Author

KingArtherTT commented Feb 18, 2022

I already fixed it.
you need run the following command and manually specify the path of _cpp.so file .
1. python setup.py build
2. python setup.py install
3. check the _cpp.so file path and remember it.
4. set the code in cpp_extension.py file
5. lib_dir = 'the path of your _cpp.so file'

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

1 participant