Issue
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.
Solution
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.
Answered By - wjandrea
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.