新浪博客

查看python,numpy,scipy,matplotlib的版本及安装位置

2016-08-09 18:49阅读:
原文在这里
命令行下查看python和numpy的版本和安装位置
1、查看python版本
方法一:
  python -V
  注意:‘-V‘中‘V’为大写字母,只有一个‘-’
方法二:
  python --version  
  注意:‘--version'中有两个‘-’
2、查看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'
3、查看Numpy版本
python -c 'import numpy; print numpy.version.version'

python -c 'import numpy; print numpy.__version__'
4、查看Numpy安装路径
python -c 'import
numpy; print numpy.__file__'
5、查看SciPy版本
python -c 'import scipy; print scipy.version.version'

python -c 'import scipy; print scipy.__version__'
6、查看SciPy安装路径
python -c 'import scipy; print scipy.__file__'

7、查看Matplotlib版本
python -c 'import matplotlib; print matplotlib.version.version'

python -c 'import matplotlib; print matplotlib.__version__'
8、查看SciPy安装路径
python -c 'import matplotlib; print matplotlib.__file__'

我的更多文章

下载客户端阅读体验更佳

APP专享