Options for handling missing libraries? #12956
Unanswered
ThinkTransit
asked this question in
Libraries & Drivers
Replies: 2 comments 1 reply
-
It's a bit pushy but I prefer try:
import logging
except ImportError:
# If not network connected, from computer run: mpremote mip install "logging"
import mip
mip.install("logging")
log = logging.getLogger(__name__) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Or include a That should convey the message, and I hope mpremote will accept this as input at some point in time |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Any thoughts on a good way to handle missing libraries, for example I like to use the logging module in my projects however when sharing code with others, they may not necessarily have the logging module installed.
This is the best I have but I'm sure there is a more pythonic way?
Beta Was this translation helpful? Give feedback.
All reactions