0

I am currently using Abaqus 2016 with the default python 2.7.3. and have read a few different pages/blogs on how to install the scipy module and have been unsuccessful in doing so. From everything I have read, it looks like you simply copy the site-packages over once you get them working. Does anyone have experience in doing this? This might be specific to the scipy module but if there are other modules to import, I'm sure the same procedure could be followed.

I tried downloading Anaconda3 and then Anaconda2 trying to downgrade numpy/scipy and that didn't work either. Here is the link to a previous question I was following.

The current NumPy version installed within Abaqus Python is 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'

To try a different approach, I downloaded Python 2.7.3 from the Python archives. Defined a new environment variable python2 because I currently have python3 on my computer. After downloading this manually, I haven't been able to import the module numpy. After downloading numpy 1.6.2 and extracting the zip file and copy/pasting the folder inside the python27 site-packages, I opened the command window, changed the directory to the location where the setup.py file is located within numpy. Following the steps outlined here I used the following command python2 setup.py install.

cd C:\Python27\Lib\site-packages\numpy>

Then tried running the following command to set up the module

python2 setup.py install

Here is the error message that I'm unsure how to resolve

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

I'm new to manually importing modules since I mainly use pip install which I guess is not supported by previous versions of python. If there is a better way to do this, please let me know as the goal is to import scipy into Abaqus Python Interface for data analysis.

Thanks!

  • 1
    This is not supported within the `abaqus python` environment. You are stuck re-implementing `scipy` using `numpy` or get a second environment and communicate between them as outlined [here](https://stackoverflow.com/questions/43334302/communication-between-two-separate-python-engines) – Daniel F Nov 05 '20 at 14:44

1 Answers1

1

Unfortunately I can only partially answer your question.

It is indeed possible to do what you want. I am currently using NumPy 1.7.1 and SciPy 0.12.1 with my Abaqus installation. In both cases I simply copied the package folder into the Abaqus site-packages folder. However, this was on Linux rather than Windows, so I can't help with your installation issues for the packages themselves.

One thing to check is that the version of SciPy you want to use is compatible with the version of NumPy you intend to install per this link.

Acrimmon
  • 31
  • 3