Code: Select all
>>> upip.install('crypto')
Installing to: /lib/
Error installing 'crypto': , packages may be partially installed
Code: Select all
>>> upip.install('crypto')
Installing to: /lib/
Error installing 'crypto': , packages may be partially installed
I've had similar feelings when developing MicroPython and CircuitPython package management for Thonny. For CPython there are just PyPI and pip. For MicroPython there is PyPI with stripped (not pip-compatible) sdists for upip and there is micropython.org/pi (the result of a quarrel if I'm not mistaken). For CircuitPython there are zip-bundles with their own system for expressing dependencies (there are also PyPI packages, which are kind of usable but as they are meant for CPython, they have this huge blinka dependency).Jibun no kage wrote: ↑Mon Aug 01, 2022 8:48 pmI have to say, that the one frustrating thing with MicroPython is what appears to be no documentation now how to manage libraries. Thonny does it one way, others say just copy files to the root file system of the device, etc., etc, etc.
Dependency management doesn't have to be a runtime issue ie. requiring RAM (it isn't even in CPython). As far as I can see, upip (and external package management tools) could easily store some metadata in lib directory next to the modules and make good use of it, as we have used to expect in CPython world. That's why I created https://pypi.org/project/pipkin/, successor to my earlier minipip. Thonny 4.0 is using pipkin instead of minipip.
In fact, there are PEP-s for describing how to mark package compatibility ("Programming Language :: Python :: Implementation :: MicroPython") and/or publish different wheels for different targets. For example, if MicroPython community decided that it is willing to publish separately marked wheels for MicroPython, then PyPI and pip would be already there -- for example you could use `pip download <package name>` to get all packages and their dependencies downloaded and extracted into a specified folder (see https://github.com/aivarannamaa/packaging_experiment)Jibun no kage wrote: ↑Thu Aug 04, 2022 4:15 pmI am suggesting to Thonny development team, they should add a filter feature to the search to allow for narrowed search, for example only list packages that are explicitly CPython or MicroPython compliant for example, there has to be something in PyPi that allows for this idea no? If not, maybe that is part of the problem?
Sorry that no-one picked up on your announcement, Aivar. I'm fairly sure (and the minimal response here to the RFC: Move forums to GitHub Discussions thread may confirm it) that the MicroPython team don't look at the forum for project guidance.aivarannamaa wrote: ↑Sat Aug 06, 2022 8:27 amI'm not sure the community is willing to change MicroPython packaging more similar to CPython, though. When I introduced pipkin and hoped to spark discussion, I got no replies neither in MicroPython forum (viewtopic.php?f=15&t=11783) nor in CircuitPython forum (https://forums.adafruit.com/viewtopic.php?f=60&t=189621). In fact, this thread is the first I've met, which complains about the current situation.
That is not really the case though: most of the people having contributed to micropython on Github also have and still do here. But this is all about volunteering so one cannot expect every single question to be seen/answered. Moreover even if literally none of the contributers would ever engage here, it would still make sense to have a forum, for the users, because some users know more than others so the former can help the latter.Jibun no kage wrote: ↑Thu Aug 11, 2022 2:09 amif solution developers (i.e. MicroPython) are not engaged in the forum
Simply said the forum is for general Q&A, mostly by users. Github is for developers, reporting bugs, feature requests, ... And to make things complicated of course there can be overlapit begs the question, what is the point of either the forum or Github issues, features options?
No, I'm saying that the MicroPython team is considering closing this forum and moving to Github Discussions.Jibun no kage wrote: ↑Thu Aug 11, 2022 2:09 amAre you suggesting that having to separate 'groups' is functional or of benefit?
Sorry I missed this -- I took some time off the forum around then because we had a baby (a few days before that post..!)aivarannamaa wrote: ↑Sat Aug 06, 2022 8:27 amI'm not sure the community is willing to change MicroPython packaging more similar to CPython, though. When I introduced pipkin and hoped to spark discussion, I got no replies neither in MicroPython forum (viewtopic.php?f=15&t=11783) nor in CircuitPython forum (https://forums.adafruit.com/viewtopic.php?f=60&t=189621). In fact, this thread is the first I've met, which complains about the current situation.
I spend a lot of time on the forum and use the experience in the forum to feed back to the rest of the MicroPython team. Unfortunately I'm just one person and (as above) sometimes I take time off.