微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用预先安装的Abaqus Python 2.7.3将scipy模块导入Abaqus 2016以进行数据分析

如何解决使用预先安装的Abaqus Python 2.7.3将scipy模块导入Abaqus 2016以进行数据分析

我当前正在使用Abaqus 2016和认的python 2.7.3。并阅读了一些有关如何安装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,guide not found in C:\
  libraries mkl,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,atlas not found in C:\
  libraries ptf77blas,atlas not found in C:\Python27\libs
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in C:\Python27\lib
  libraries f77blas,atlas not found in C:\
  libraries f77blas,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,guide not found in C:\Python27\libs
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries ptf77blas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries ptf77blas,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,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries f77blas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries f77blas,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,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安装中使用NumPy 1.7.1和SciPy 0.12.1。在这两种情况下,我都只是将package文件夹复制到Abaqus site-packages文件夹中。但是,这是在Linux而不是Windows上进行的,因此对于软件包本身的安装问题,我无能为力。

要检查的一件事是,您要使用的SciPy版本与您打算根据this link安装的NumPy版本兼容。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。