8000 cant use opencv-python? · Issue #140 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

cant use opencv-python? #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and 8000 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

Closed
Amith225 opened this issue May 3, 2022 · 8 comments
Closed

cant use opencv-python? #140

Amith225 opened this issue May 3, 2022 · 8 comments
Labels
package Issues related to dependencies that are not in pyodide and cannot be installed with micropip

Comments

@Amith225
Copy link
Amith225 commented May 3, 2022
- opencv-python

gives error in console, stating cant get pure python wheel:

Uncaught (in promise) PythonError: Traceback (most recent call last):
File "/lib/python3.10/asyncio/futures.py", line 201, in result
raise self._exception
File "/lib/python3.10/asyncio/tasks.py", line 234, in __step
result = coro.throw(exc)
File "/lib/python3.10/site-packages/micropip/_micropip.py", line 183, in install
transaction = await self.gather_requirements(requirements, ctx, keep_going)
File "/lib/python3.10/site-packages/micropip/_micropip.py", line 173, in gather_requirements
await gather(*requirement_promises)
File "/lib/python3.10/asyncio/futures.py", line 284, in await
yield self # This tells Task to wait for completion.
File "/lib/python3.10/asyncio/tasks.py", line 304, in __wakeup
future.result()
File "/lib/python3.10/asyncio/futures.py", line 201, in result
raise self._exception
File "/lib/python3.10/asyncio/tasks.py", line 232, in __step
result = coro.send(None)
File "/lib/python3.10/site-packages/micropip/_micropip.py", line 286, in add_requirement
raise ValueError(
ValueError: Couldn't find a pure Python 3 wheel for 'opencv-python'. You can use micropip.install(..., keep_going=True) to get a list of all packages with missing wheels.

@Rjtsahu
Copy link
Rjtsahu commented May 3, 2022

Yeah, seems opencv-python package is not supported on micropip installer

@rth
Copy link
Contributor
rth commented May 3, 2022

It will be supported as soon as the next Pyodide version is released (and pyscript updates to using it) see pyodide/pyodide#2424 for more details.

@antocuni antocuni added the package Issues related to dependencies that are not in pyodide and cannot be installed with micropip label May 6, 2022
@MeloHenrique
Copy link

Pyodide already has a dev version that uses it, isn't it possible to override the default version Pyscript uses?

@marimeireles
Copy link
Contributor

@MeloHenrique I think in this case you'll want to change the version of Pyodide that PyScript is using, right?
This might help: #328
I don't think we'll default the Pyodide version to be the most recent release. I think we'll keep having the stable one as default.

@ryanking13
Copy link

Recent Pyodide 0.21.0 release includes opencv-python :)

@marimeireles
Copy link
Contributor

Cool! Thank you for reporting back @ryanking13.
Guess I'm closing this one then since we updated to this version.
Cheers.

@DamaniMC
Copy link
DamaniMC commented Jun 2, 2023

Recent Pyodide 0.21.0 release includes opencv-python :)

I'm, having the same issue on 0.22.1 :(

@JeffersGlass
Copy link
Contributor

@DamaniMC Are you having the same issue with it not importing? This works for me in PyScript 2023.03.1 / Pyodide 0.22.1:

<py-config>
    packages = ['opencv-python']
</py-config>
<py-script>
    import cv2
    print(cv2.__version__) # 4.6.0
</py-script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package Issues related to dependencies that are not in pyodide and cannot be installed with micropip
Projects
None yet
Development

No branches or pull requests

9 participants
0