【发布时间】:2020-10-29 23:35:33
【问题描述】:
我目前正在使用带有默认 python 2.7.3 的 Abaqus 2016。并阅读了一些关于如何安装scipy 模块的不同页面/博客,但没有成功。从我读过的所有内容来看,一旦您让它们工作,您似乎只需将site-packages 复制过来。有没有人有这样做的经验?这可能特定于 scipy 模块,但如果还有其他模块要导入,我相信可以遵循相同的过程。
我尝试下载 Anaconda3,然后 Anaconda2 尝试降级 numpy/scipy,但也没有用。这是我关注的上一个问题的link。
当前安装在 Abaqus Python 中的NumPy 版本是 1.6.2。
abaqus python
>>> import sys
>>> sys.version
'2.7.3 (default, Feb 7 2015, 16:00:35) [MSC v.1700 64 bit (AMD64)]'
>>> import numpy
>>> numpy.version.version
'1.6.2'
为了尝试不同的方法,我从 Python 档案中下载了 Python 2.7.3。定义了一个新的环境变量python2,因为我的计算机上目前有python3。手动下载后,我无法导入模块numpy。下载 numpy 1.6.2 并解压缩 zip 文件并复制/粘贴 python27 site-packages 内的文件夹后,我打开命令窗口,将目录更改为 setup.py 文件在 numpy 中所在的位置。按照here 概述的步骤,我使用了以下命令python2 setup.py install。
cd C:\Python27\Lib\site-packages\numpy>
然后尝试运行以下命令来设置模块
python2 setup.py install
这是我不确定如何解决的错误消息
C:\Python27\Lib\site-packages\numpy>python2 setup.py install
Running from numpy source directory.Forcing DISTUTILS_USE_SDK=1
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in C:\Python27\lib
libraries mkl,vml,guide not found in C:\
libraries mkl,vml,guide not found in C:\Python27\libs
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1425: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
libraries blas not found in C:\Python27\lib
libraries blas not found in C:\
libraries blas not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1434: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1437: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
NOT AVAILABLE
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in C:\Python27\lib
libraries mkl,vml,guide not found in C:\
libraries mkl,vml,guide not found in C:\Python27\libs
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1340: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
libraries lapack not found in C:\Python27\lib
libraries lapack not found in C:\
libraries lapack not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1351: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1354: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
NOT AVAILABLE
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
我是手动导入模块的新手,因为我主要使用pip install,我猜以前版本的python 不支持它。如果有更好的方法,请告诉我,因为目标是将scipy 导入 Abaqus Python 接口进行数据分析。
谢谢!
【问题讨论】:
-
abaqus python环境不支持此功能。您被困在使用numpy重新实现scipy或获得第二个环境并按照here 概述的方式在它们之间进行通信
标签: python numpy import scipy abaqus