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

Using CV2 with Python in Godot #361

Open
KimV2 opened this issue Aug 3, 2022 · 3 comments
Open

Using CV2 with Python in Godot #361

KimV2 opened this issue Aug 3, 2022 · 3 comments

Comments

@KimV2
Copy link

KimV2 commented Aug 3, 2022

Hello,

I've been able to find and get Python with CV2 to recognize gestures. I would like to use the code within Godot and I've used your Python video to get Python to work within Godot. I've gotten a number of functions and classes to be imported into Godot from other files. What I have NOT been able to do is import libraries such as numpy and cv2 (opencv-python). Is this possible? If so, please provide the syntax. If the syntax is within a small demo that would be of great help.

Thanks

@dranorter
Copy link
Contributor

Hello,

I contributed a writeup of how to do this, it's part of the FAQ: https://github.com/touilleMan/godot-python#faq It's the second question there.

Hopefully I've explained it well! Let me know.

@TheBricktop
Copy link

Im on windows10 and none of the above ways worked for me.
Ive tried to import the opencv packages using the command line method but the pip is always trying to reference the system wide python install and ignores the python.exe in the godot project. Ive tried also running the script that had the packages in list and called pip to install them all but the same happens. requirements are satisfied because the packages are installed system wide and not in the folder itself.

@mojoyup
Copy link

mojoyup commented May 24, 2023

Try to git bash into the folder instead and reference python not from 'python -m ...' but from './python -m ...'. That will use the python.exe in the resource of Godot rather than on the system.

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

4 participants