Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major improvements (discussion) #37

Open
vkhodygo opened this issue May 28, 2018 · 4 comments
Open

Major improvements (discussion) #37

vkhodygo opened this issue May 28, 2018 · 4 comments

Comments

@vkhodygo
Copy link
Collaborator

vkhodygo commented May 28, 2018

Hey folks

I've been thinking for a while about possible things that can be done. However, there are some problems that have to be discussed.

First, I think that the project has to be moved to Python 3 since Python 2 faces end-of-life in 2020. You probably know that supporting legacy software is sometimes extremely painful.

Second, we need to discuss cross-platform features of the package. I'm a Linux user so, to be honest, I do not care about other systems. However, I know that certain researchers use Windows or MacOS and do not want to learn new stuff. So, something has to be done in this case.

Finally, we can add the package to the official repository to make its installation easier.

I would like to discuss this with you before starting anything new.

V.

@williamhunter
Copy link
Owner

williamhunter commented May 28, 2018 via email

@CharlesFr
Copy link

CharlesFr commented Nov 30, 2018

Any updates on this issue?

Pysparse seems to be causing me some issues, when installed using pip, I get the following error:

(topology) $ pip install pysparse
Collecting pysparse
  Using cached https://files.pythonhosted.org/packages/19/73/4429c57b285fa77ffabbfc078f35e2b7ef18eb317e8c82e2c8ff6992d5ae/pysparse-1.3-dev.tar.gz
Requirement already satisfied: numpy>=1.2 in /anaconda3/envs/topology/lib/python2.7/site-packages (from pysparse) (1.14.2)
Building wheels for collected packages: pysparse
  Running setup.py bdist_wheel for pysparse ... error
  Complete output from command /anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-wheel-plsLRw --python-tag cp27:
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  Error while parsing svn version
  /anaconda3/envs/topology/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'summary'
    warnings.warn(msg)
  non-existing path in '': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/anaconda3/envs/topology/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/anaconda3/envs/topology/include']

    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/anaconda3/envs/topology/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/anaconda3/envs/topology/include']

  Sparse:: Using BLAS info:
  {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
  non-existing path in 'pysparse/sparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
  Using dflt_lib_dirs =  []
  Using dflt_libs =  []
  Eigen:: Using BLAS info:
  {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
  lapack_opt_info:
  lapack_mkl_info:
  customize UnixCCompiler
    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/anaconda3/envs/topology/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/anaconda3/envs/topology/include']

    FOUND:
      libraries = ['mkl_rt', 'pthread']
      library_dirs = ['/anaconda3/envs/topology/lib']
      define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
      include_dirs = ['/anaconda3/envs/topology/include']

  Eigen:: Using LAPACK info:
  {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
  Direct:: Using BLAS info:
  {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS',None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
  Using default UMFPACK and AMD
   If you do not like this, edit the [UMFPACK] and [AMD]
   sections of site.cfg
  non-existing path in 'pysparse/direct': 'umfpack/include'
  non-existing path in 'pysparse/direct': 'amd/include'
  Using default SuperLU.
   If you do not like this, edit the [SuperLU] section of site.cfg
  non-existing path in 'pysparse/direct': 'superlu/include'
  non-existing path in 'pysparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
  /anaconda3/envs/topology/lib/python2.7/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '1.3-dev' to '1.3.dev0'
    normalized_version,
  running bdist_wheel
  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 extension "pysparse.sparse.spmatrix" sources
  building extension "pysparse.eigen.jdsym" sources
  building extension "pysparse.direct.umfpack" sources
  building extension "pysparse.direct.superlu" sources
  building extension "pysparse.itsolvers.krylov" sources
  building extension "pysparse.precon.precon" sources
  build_src: building npy-pkg config files
  running build_py
  creating build/lib.macosx-10.6-x86_64-2.7
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse
  copying pysparse/version.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
  copying pysparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
  copying pysparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  copying pysparse/sparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  copying pysparse/sparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  copying pysparse/sparse/pysparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  copying pysparse/sparse/sparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/sparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
  copying pysparse/eigen/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
  copying pysparse/eigen/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/eigen/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying pysparse/direct/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying pysparse/direct/pysparseSuperLU.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying pysparse/direct/pysparseUmfpack.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying pysparse/direct/directSolver.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying pysparse/direct/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/direct/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
  copying pysparse/itsolvers/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
  copying pysparse/itsolvers/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
  copying pysparse/itsolvers/itsolvers_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/itsolvers/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
  copying pysparse/precon/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
  copying pysparse/precon/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
  copying build/src.macosx-10.6-x86_64-2.7/pysparse/precon/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/sparray.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/poisson_vec.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/sptime.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/poisson.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  copying pysparse/tools/spmatrix_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
  creating build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
  copying pysparse/misc/system.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
  copying pysparse/misc/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
  running build_ext
  customize UnixCCompiler
  customize UnixCCompiler using build_ext
  building 'pysparse.sparse.spmatrix' extension
  compiling C sources
  C compiler: gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

  creating build/temp.macosx-10.6-x86_64-2.7/pysparse
  creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse
  creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src
  compile options: '-DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c'
  gcc: pysparse/sparse/src/spmatrixmodule.c
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: Command "gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c pysparse/sparse/src/spmatrixmodule.c -o build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o -MMD -MF build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o.d" failed with exit status 1

  ----------------------------------------
  Failed building wheel for pysparse
  Running setup.py clean for pysparse
Failed to build pysparse
Installing collected packages: pysparse
  Running setup.py install for pysparse ... error
    Complete output from command /anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-record-ujN9Mc/install-record.txt --single-version-externally-managed --compile:
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    Error while parsing svn version
    /anaconda3/envs/topology/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'summary'
      warnings.warn(msg)
    non-existing path in '': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
    blas_opt_info:
    blas_mkl_info:
    customize UnixCCompiler
      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/anaconda3/envs/topology/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/anaconda3/envs/topology/include']

      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/anaconda3/envs/topology/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/anaconda3/envs/topology/include']

    Sparse:: Using BLAS info:
    {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
    non-existing path in 'pysparse/sparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
    Using dflt_lib_dirs =  []
    Using dflt_libs =  []
    Eigen:: Using BLAS info:
    {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/anaconda3/envs/topology/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/anaconda3/envs/topology/include']

      FOUND:
        libraries = ['mkl_rt', 'pthread']
        library_dirs = ['/anaconda3/envs/topology/lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['/anaconda3/envs/topology/include']

    Eigen:: Using LAPACK info:
    {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
    Direct:: Using BLAS info:
    {'libraries': ['mkl_rt', 'pthread'], 'library_dirs': ['/anaconda3/envs/topology/lib'], 'define_macros': [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)], 'include_dirs': ['/anaconda3/envs/topology/include']}
    Using default UMFPACK and AMD
     If you do not like this, edit the [UMFPACK] and [AMD]
     sections of site.cfg
    non-existing path in 'pysparse/direct': 'umfpack/include'
    non-existing path in 'pysparse/direct': 'amd/include'
    Using default SuperLU.
     If you do not like this, edit the [SuperLU] section of site.cfg
    non-existing path in 'pysparse/direct': 'superlu/include'
    non-existing path in 'pysparse': '/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include'
    /anaconda3/envs/topology/lib/python2.7/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '1.3-dev' to '1.3.dev0'
      normalized_version,
    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 extension "pysparse.sparse.spmatrix" sources
    building extension "pysparse.eigen.jdsym" sources
    building extension "pysparse.direct.umfpack" sources
    building extension "pysparse.direct.superlu" sources
    building extension "pysparse.itsolvers.krylov" sources
    building extension "pysparse.precon.precon" sources
    build_src: building npy-pkg config files
    running build_py
    creating build/lib.macosx-10.6-x86_64-2.7
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse
    copying pysparse/version.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
    copying pysparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
    copying pysparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    copying pysparse/sparse/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    copying pysparse/sparse/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    copying pysparse/sparse/pysparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    copying pysparse/sparse/sparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/sparse/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/sparse
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
    copying pysparse/eigen/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
    copying pysparse/eigen/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/eigen/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/eigen
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying pysparse/direct/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying pysparse/direct/pysparseSuperLU.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying pysparse/direct/pysparseUmfpack.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying pysparse/direct/directSolver.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying pysparse/direct/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/direct/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/direct
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
    copying pysparse/itsolvers/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
    copying pysparse/itsolvers/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
    copying pysparse/itsolvers/itsolvers_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/itsolvers/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/itsolvers
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
    copying pysparse/precon/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
    copying pysparse/precon/setup.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
    copying build/src.macosx-10.6-x86_64-2.7/pysparse/precon/__config__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/precon
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/sparray.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/poisson_vec.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/sptime.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/poisson.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    copying pysparse/tools/spmatrix_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/tools
    creating build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
    copying pysparse/misc/system.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
    copying pysparse/misc/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse/misc
    running build_ext
    customize UnixCCompiler
    customize UnixCCompiler using build_ext
    building 'pysparse.sparse.spmatrix' extension
    compiling C sources
    C compiler: gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

    creating build/temp.macosx-10.6-x86_64-2.7/pysparse
    creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse
    creating build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src
    compile options: '-DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c'
    gcc: pysparse/sparse/src/spmatrixmodule.c
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: Command "gcc -fno-strict-aliasing -I/anaconda3/envs/topology/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DLENFUNC_OK=1 -DSCIPY_MKL_H -DHAVE_CBLAS -Ipysparse/sparse/src -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/anaconda3/envs/topology/lib/python2.7/site-packages/numpy/core/include -I/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/pysparse/include -I/anaconda3/envs/topology/include/python2.7 -c pysparse/sparse/src/spmatrixmodule.c -o build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o -MMD -MF build/temp.macosx-10.6-x86_64-2.7/pysparse/sparse/src/spmatrixmodule.o.d" failed with exit status 1

    ----------------------------------------
Command "/anaconda3/envs/topology/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-record-ujN9Mc/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ss/05hswsx96fbgr7jh86lwgnj40000gn/T/pip-install-dzyZhE/pysparse/

And when using the conda installer, I get the following error when running python scripts/optimise.py templates/minimal.tpd:

[(topology) $ python scripts/optimise.py templates/minimal.tpd
Traceback (most recent call last):
  File "scripts/optimise.py", line 8, in <module>
    import topy
  File "/anaconda3/envs/topology/lib/python2.7/site-packages/topy/__init__.py", line 8, in <module>
    from .topology import *
  File "/anaconda3/envs/topology/lib/python2.7/site-packages/topy/topology.py", line 14, in <module>
    from pysparse import superlu, itsolvers, precon
  File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/__init__.py", line 13, in <module>
    from sparse import spmatrix
  File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/__init__.py", line 6, in <module>
    from pysparseMatrix import *
  File "/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/pysparseMatrix.py", line 57, in <module>
    from pysparse.sparse import spmatrix
ImportError: dlopen(/anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/spmatrix.so, 2): Library not loaded: @rpath/libopenblas.dylib
  Referenced from: /anaconda3/envs/topology/lib/python2.7/site-packages/pysparse/sparse/spmatrix.so
  Reason: image not found](url)

Any ideas?

EDIT: This fixed the conda install

@VikingScientist
Copy link

Hi, Yes, moving it to Python 3 makes sense, it should be fairly easy, the only stumbling block is PySparse, which is not being maintained (last time I checked). If one can find a solver that works as fast PySparse (which is just a wrapper for SuperLU and some Iterative solvers) then it should be fairly quick and painless to do (CHOLMOD?). ToPy's matrices are always Positive Definite so the solver one chooses should exploit this property. William

Scipy seems to be the obvious candidate. Together with numpy they form the de facto standard startup for scientific computations in python. According to https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.splu.html then it also uses the same backend: that is SuperLU

@williamhunter
Copy link
Owner

williamhunter commented May 9, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants