How do I get the IPython version I'm currently using?
I'm aware of sys.version
, but that's the Python version I'm currently using.
Edit: And I'm aware of ipython --version
, but I want to check inside the current IPython session. !ipython --version
doesn't work for me cause I might have multiple IPython versions installed.
You can import IPython
, then use IPython.version_info
to get it as a tuple, or IPython.__version__
to get it as a string. For example:
In [1]: import IPython
In [2]: IPython.version_info
Out[2]: (4, 1, 2, '')
In [3]: IPython.__version__
Out[3]: '4.1.2'
IPython.version_info
seems to be the same layout as sys.version_info
: major, minor, micro, releaselevel.
Run the following command in the terminal:
ipython --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With