Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It is possible through importlib
In [1]: import importlib
In [2]: requests.__version__
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-37d800a179a9> in <module>
----> 1 requests.__version__
NameError: name 'requests' is not defined
In [3]: requests = importlib.import_module('requests')
In [4]: requests.__version__
Out[4]: '2.22.0'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question