查看python,numpy,scipy,matplotlib的版本及版本更新

转载地址:http://blog.csdn.net/cookie_234/article/details/70312333

查看版本

原文在这里

  • 查看python版本
    方法一:
    python -V 注意:‘-V‘中‘V’为大写字母,只有一个‘-’
    方法二:
    python –version 注意:‘–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”
  • 查看Numpy版本
    python -c “import numpy; print numpy.version.version”

    python -c “import numpy; print numpy.version
  • 查看Numpy安装路径
    python -c “import numpy; print numpy.file

  • 查看SciPy版本
    python -c “import scipy; print scipy.version.version”

    python -c “import scipy; print scipy.version

  • 查看SciPy安装路径
    python -c “import scipy; print scipy.file

  • 查看Matplotlib版本
    python -c “import matplotlib; print matplotlib.version.version”

    python -c “import matplotlib; print matplotlib.version
  • 查看Matplotlib安装路径
    python -c “import matplotlib; print matplotlib.file

升级包

  • 可以用pip命令:
    pip install -U <包名>
    或: pip install <包名> –upgrade
  • Matplotlib,SciPy在安装时始终报错,决定手动下载包安装(随便两个我下过的地址):
    • Matplotlib下载地址
    • Scipy下载地址
    • 下载后直接:
      cd XX
      python setup.py install
  • scipy报错: error:library dfftpack has Fortran sources but no Fortran compiler found
    • 也有人遇到了这个错误:问题链接
    • 根据里面的建议,我最后是用 sudo apt-get install libatlas-base-dev gfortran 后再手动安装解决的

备注一个“pip常用命令”:

http://www.cnblogs.com/xueweihan/p/4981704.html


你可能感兴趣的:(查看python,numpy,scipy,matplotlib的版本及版本更新)