如何在没有root权限的情况下安装numpy 和scipy python module
2015-06-03 14:55
856 查看
参考:
http://www.hongliangjie.com/2012/04/01/install-numpy-and-scipy-on-centos-without-root-privilege/
Sometimes you want to install Numpy and Scipy on a remote CentOS machine without root privilege, which is usually true when you are using a university server. Before you proceed to the following instructions, you need to make sure that a copy of Python is installed. This is also done without root privilege, meaning that you may install it in an alternative directory, rather than system directory.
Download the latest version of BLAS and extracted it into path [BLAS].
Note that in almost all tutorials on how to install Numpy and Scipy on Linux machines discuss how to install them with ATALS. This is possible only if you have the root privilege where you can turn off CPU threshoding . Since we do not have root privilege, we can only install them with LAPACK and BLAS.
a) Enable “[DEFAULT]” section and add
src_dirs = [BLAS]:[LAPACK]
b) Add
[blas_opt]
libraries = f77blas, cblas
[lapack_opt]
libraries = lapack, f77blas, cblas
Type the following command in the shell:
python setup.py build –fcompiler=gnu95
which will compile the package with “gfortran”.
Type the following command in the shell:
python setup.py install
http://www.hongliangjie.com/2012/04/01/install-numpy-and-scipy-on-centos-without-root-privilege/
Sometimes you want to install Numpy and Scipy on a remote CentOS machine without root privilege, which is usually true when you are using a university server. Before you proceed to the following instructions, you need to make sure that a copy of Python is installed. This is also done without root privilege, meaning that you may install it in an alternative directory, rather than system directory.
Prerequisite:
Download the latest version of LAPACK and extracted it into path [LAPACK].Download the latest version of BLAS and extracted it into path [BLAS].
Note that in almost all tutorials on how to install Numpy and Scipy on Linux machines discuss how to install them with ATALS. This is possible only if you have the root privilege where you can turn off CPU threshoding . Since we do not have root privilege, we can only install them with LAPACK and BLAS.
Step 1: Install Numpy
Edit “site.cfg”a) Enable “[DEFAULT]” section and add
src_dirs = [BLAS]:[LAPACK]
b) Add
[blas_opt]
libraries = f77blas, cblas
[lapack_opt]
libraries = lapack, f77blas, cblas
Type the following command in the shell:
python setup.py build –fcompiler=gnu95
which will compile the package with “gfortran”.
Type the following command in the shell:
python setup.py install
Step 2: Install Scipy
Once Numpy is installed. Scipy can be easily built and installed through normal “python setup.py build” and “python setup.py install” process. Remember that these command should be accompanied with “–fcompiler=gnu95″.相关文章推荐
- Python 清理HTML标签相似PHP的strip_tags函数功能(二)
- python获取各操作系统硬件信息的方法
- Python 虚拟环境:virtualenv
- 经典排序算法总结与实现 ---python
- python中的zip学习
- Python Note
- Installing python-ldap in Ubuntu
- python 基础学习 正则表达式2(使用)
- 在 Mac OS X 10.10 安装 pyenv 的一个小坑
- python类基本语法笔记
- Python基础 语法特别注意笔记(和Java相比)
- Python基础 语法特别注意笔记(和Java相比)
- wxPython定时器wx.Timer简单应用实例
- Python基于DES算法加密解密实例
- Python使用minidom读写xml的方法
- ipython 学习笔记 2 network graph--NetworkX
- wxpython基本控件-静态文本控件
- Python实现程序的单一实例用法分析
- python简单获取本机计算机名和IP地址的方法
- python的udp服务器多进程编程