scipy在cygwin的安装
2017-08-31 16:15
316 查看
折腾一天,总结一下:
下载lapack-3.7.1,拷贝install目录下的make.inc.gfortran.到上一级目录,改名make.inc
OPTS = -O2 -frecursive -m64 -fPIC
DRVOPTS = $(OPTS)
NOOPT = -O0 -frecursive -m64 -fPIC
加上m64,fPIC对于amd64没用,加上无妨
make
然后到CBLAS目录下make,生成libcblas.a
在scipy源代码目录site.cfg文件中加入
[cblas]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
blas_libs = cblas
extra_compile_args =-m64
[blas]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
blas_libs = blas
extra_compile_args =-m64
[lapack]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
lapack_libs = lapack
extra_compile_args =-m64
再修改F:\cygwin64\lib\python2.7\site-packages\numpy\distutils\system_info.py文件
加入extra_preargs="-m64"
def has_cblas(self, info):
# primitive cblas check by looking for the header and trying to link
# cblas or blas
res = False
c = distutils.ccompiler.new_compiler()
c.customize('')
tmpdir = tempfile.mkdtemp()
s = """#include <cblas.h>
int main(int argc, const char *argv[])
{
double a[4] = {1,2,3,4};
double b[4] = {5,6,7,8};
return cblas_ddot(4, a, 1, b, 1) > 10;
}"""
src = os.path.join(tmpdir, 'source.c')
try:
with open(src, 'wt') as f:
f.write(s)
try:
# check we can compile (find headers)
obj = c.compile([src], output_dir=tmpdir,
include_dirs=self.get_include_dirs(), extra_preargs="-m64")
最后在scipy根目录下python setup.py install,这样可以不用编译MKL
下载lapack-3.7.1,拷贝install目录下的make.inc.gfortran.到上一级目录,改名make.inc
OPTS = -O2 -frecursive -m64 -fPIC
DRVOPTS = $(OPTS)
NOOPT = -O0 -frecursive -m64 -fPIC
加上m64,fPIC对于amd64没用,加上无妨
make
然后到CBLAS目录下make,生成libcblas.a
在scipy源代码目录site.cfg文件中加入
[cblas]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
blas_libs = cblas
extra_compile_args =-m64
[blas]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
blas_libs = blas
extra_compile_args =-m64
[lapack]
library_dirs = /home/wuzhiqiao/lapack-3.7.1/lapack-3.7.1
lapack_libs = lapack
extra_compile_args =-m64
再修改F:\cygwin64\lib\python2.7\site-packages\numpy\distutils\system_info.py文件
加入extra_preargs="-m64"
def has_cblas(self, info):
# primitive cblas check by looking for the header and trying to link
# cblas or blas
res = False
c = distutils.ccompiler.new_compiler()
c.customize('')
tmpdir = tempfile.mkdtemp()
s = """#include <cblas.h>
int main(int argc, const char *argv[])
{
double a[4] = {1,2,3,4};
double b[4] = {5,6,7,8};
return cblas_ddot(4, a, 1, b, 1) > 10;
}"""
src = os.path.join(tmpdir, 'source.c')
try:
with open(src, 'wt') as f:
f.write(s)
try:
# check we can compile (find headers)
obj = c.compile([src], output_dir=tmpdir,
include_dirs=self.get_include_dirs(), extra_preargs="-m64")
最后在scipy根目录下python setup.py install,这样可以不用编译MKL
相关文章推荐
- windows8.1下安装Cygwin并通过apt-cyg安装软件包
- ndk+opencv安装+各种错误分析(新版安装,编译不需要Cygwin 和Sequoyah了)
- cygwin下安装crosstool-ng错误'Installing kernel headers': scripts/basic/fixdep: No such file or directory
- Cygwin在win平台上运行的unix模拟环境》本地安装版
- cygwin下安装配置crontab
- Windows 安装python、pip、numpy、scipy
- Windows10下安装numpy和scipy(避免“ImportError: cannot import name NUMPY_MKL”)
- window 安装anaconda(内置numpy与scipy) 可以作为科学计算使用
- linux系统安装pip,numpy,matplotlib,scipy,tensorflow命令
- cygwin的安装,vi的使用,gcc,g++的使用
- 下载安装Cygwin
- Cygwin安装和配置
- net start sshd 发生系统错误1069--cygwin安装过程
- Cygwin的安装
- pip安装numpy、scipy模块失败解决办法
- win7 64位 Python3.5 scipy,numpy+mkl, Gensim主题模型包安装
- window下cygwin安装实现hadoop的安装
- python numpy、scipy安装及numpy的初步使用
- Python搭建Numpy、SciPy、MatPlotLib环境(下载、安装、测试)
- 【原】Win7 下配置安装Cygwin sshd…