Import a library and all its dependencies on lib folder
-
Hi ,
I would like to use queues to communicate between my threads with this library : https://pypi.python.org/pypi/micropython-uasyncio.queues/0.1.2
However, this library need
collections.dequeanduasynio.core.1 from collections.deque import deque 2 from uasyncio.core import sleepI went to the micropython-lib github repository, I downloaded
collection.dequeand paste the source file into the lib folder.I think I'm not importing libraries correctly because I need to modify the line
from collections.deque import dequetofrom collections import dequeI tried to do the same thing with the
uasyncio.coremodule but it also needs theloggingmodule.I thing it should have a way to install a module and all its dependencies at the same time right?
I can't imagine the only way is to manually import all the dependencies.Thank you in advance.
-
@Arkaik
do you havelogging.pyin your lib folder? -
Hi @livius, no I don't have it in the lib folder.
I could put it in this folder but I imagine a situation where the module logging (or another one, whatever) also needs dependencies, I'll need to dowload them too.
And if its dependencies also need other dependencies it will be a pain in the *** to import all of them independently, even more if I need to modify the way they are imported.
That's why I'm asking if there is a faster/easier way to import a module and all its dependencies?
-
@Arkaik
Downloading whole repository?
How do you imagine that it will be automagically?
I know that this is not the same but:
Same with web page - you save it and it have link to other site. If it will automatically download all linked pages and all linked pages linked in linked pages - you will be attempting to download whole internet ;-) -
@livius
Hi thought an apt-get like or pip-like system would exist ^^.I know that when I use pip for installing new modules there is a requires.txt file to download all the needed dependencies.
When I download the module on pypi.python the folder architecture is the following one:
micropython-uasyncio.core-1.0/ micropython_uasyncio.core.egg-info/ PKG-INFO requires.txt uasyncio/ core.py test.py test2.pySo because of this architecture I thought there would have a way to use the requires.txt file to recover all the dependencies.
Maybe I'm dreaming ^^If it doesn't exist it's not a big deal, I'll just use the classic way ;-)
-
@Arkaik
classic way always work ;-)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login