码迷,mamicode.com
首页 > Windows程序 > 详细

maya2105 - windows8 - numpy/scipy

时间:2015-08-11 14:09:58      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:

To compile numpy, create a site.cfg file in numpy‘s source directory with 
the following or similar content:

[mkl]

include_dirs = C:/Program Files (x86)/Intel/Composer XE/mkl/include

library_dirs = C:/Program Files (x86)/Intel/Composer 
XE/mkl/lib/intel64;C:/Program Files (x86)/Intel/Composer 
XE/compiler/lib/intel64

mkl_libs = 
mkl_lapack95_lp64,mkl_blas95_lp64,mkl_intel_lp64,mkl_intel_thread,mkl_core,libiomp5md,libifportmd

lapack_libs = 
mkl_lapack95_lp64,mkl_blas95_lp64,mkl_intel_lp64,mkl_intel_thread,mkl_core,libiomp5md,libifportmd

Also patch .\numpy-1.9.1\numpy\core\setup.py

   #mathlibs_choices = [[], [‘m‘], [‘cpml‘]] #BEFORE

   mathlibs_choices = [[], [‘cpml‘]] #AFTER


On a command prompt in the numpy (and then scipy) source directory, 
initialize Visual Studio and Intel compilers and then build numpy/scipy, 
e.g.:


# numpy (assuming exists in c:\numpy_scipy_build\numpy-1.9.1)

# from a new admin cmd prompt

# run the following


cd c:\numpy_scipy_build\numpy-1.9.1

rd /S /Q build

"C:\Program Files (x86)\Intel\Composer XE\bin\iclvars.bat" intel64 vs2010

"C:\Program Files (x86)\Intel\Composer XE\bin\ifortvars.bat" intel64 vs2010

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64

set DISTUTILS_USE_SDK=1

set INCLUDE=%INCLUDE%;"C:\Program 
Files\Autodesk\Maya2015\include\python2.7";C:\Program Files (x86)\Microsoft 
Visual Studio 11.0\VC\include

set LIB=%LIB%;"C:\Program Files\Autodesk\Maya2015\lib";C:\Program Files 
(x86)\Microsoft Visual Studio 11.0\VC\include

"c:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" setup.py build 

"c:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" setup.py install


# scipy (assuming exists in c:\numpy_scipy_build\scipy-0.14.1)

# from a new admin cmd prompt

# run the following


cd c:\numpy_scipy_build\scipy-0.14.1

rd /S /Q build

"C:\Program Files (x86)\Intel\Composer XE\bin\iclvars.bat" intel64 vs2010

"C:\Program Files (x86)\Intel\Composer XE\bin\ifortvars.bat" intel64 vs2010

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64

set DISTUTILS_USE_SDK=1

set INCLUDE=%INCLUDE%;"C:\Program 
Files\Autodesk\Maya2015\include\python2.7";C:\Program Files (x86)\Microsoft 
Visual Studio 11.0\VC\include

set LIB=%LIB%;"C:\Program Files\Autodesk\Maya2015\lib";C:\Program Files 
(x86)\Microsoft Visual Studio 11.0\VC\include;"C:\Program 
Files\Autodesk\Maya2015\Python\Lib\site-packages\numpy\core\lib"

"c:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" setup.py build 

"c:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" setup.py build 

"c:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" setup.py install 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

This was tested w/ nose in a mayapy.exe prompt
###########
import numpy
numpy.test()

import scipy
scipy.test()
###########

Hope this helps anyone else who wants some fancy numpy/scipy in maya2015

Thanks,

+josh

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/27f0a1c9-5426-48f4-a921-9488f91485b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

参考 https://software.intel.com/zh-cn/articles/numpyscipy-with-intel-mkl
 



maya2105 - windows8 - numpy/scipy

标签:

原文地址:http://www.cnblogs.com/jonn/p/4720756.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!