How do I check which version of NumPy I'm using?

后端 未结 16 922
深忆病人
深忆病人 2020-12-07 08:48

How can I check which version of NumPy I\'m using?

(FYI this question has been edited because both the question and answer are not platform specific.)

16条回答
  •  伪装坚强ぢ
    2020-12-07 09:24

    Pure Python line that can be executed from the terminal (both 2.X and 3.X versions):

    python -c "import numpy; print(numpy.version.version)"
    

    If you are already inside Python, then:

    import numpy
    print(numpy.version.version)
    

提交回复
热议问题