查看python及其第三方库的版本和安装位置

1  查看python版本   

      python -V            注意:大V

           或者

      python --version  注意:两个‘-’

   查看python安装位置

      python -c "import sys; print sys.executable"

      或者

      python -c "import os; print os.sys.executable"
      python -c "import os; path = os.sys.executable;folder=path[0 : path.rfind(os.sep)]; print folder"

2  查看Numpy版本:   numpy.__version__

   查看Numpy安装路径:  numpy.__file__

3  查看SciPy版本:    scipy.__version__

    查看SciPy安装路径:  scipy.__file__

4   查看Matplotlib版本:  matplotlib.__version__

     查看Matplotlib安装路径:matplotlib.__file__

原文地址:https://www.cnblogs.com/wfsh-hebau/p/10009574.html