Installing sfepy in Anaconda for OS X

165 views
Skip to first unread message

Fred Hohman

unread,
Aug 4, 2015, 3:46:50 PM8/4/15
to sfepy-devel
Hi all,

I'm having some difficulties installing sfepy on a mac with anaconda running OS X Yosemite. I've looked through the installation documentation but can't seem to resolve the errors. Can anyone point me to a relevant guide (if it exists) or have suggestions?

I can post screenshots if needed.

Thanks,
Fred

Robert Cimrman

unread,
Aug 7, 2015, 6:26:51 AM8/7/15
to sfepy...@googlegroups.com
Hi Fred,
Yes, posting the console output would be helpful to diagnose the problem.

r.

Fred Hohman

unread,
Aug 10, 2015, 12:47:27 PM8/10/15
to sfepy-devel
Hi,

Apologies for the late response. 

I think I have installed SfePy, but when I run `run_tests.py` I receive the following:

> 91 test file(s) executed in 1.42 s, 105 failure(s) of 116 test(s)


In terms of required and optional packages, I receive the following when installing via `setup.py`:

> cython is available in version 0.22.1

> numpy is available in version 1.9.2

> scipy is available in version 0.15.1

> matplotlib is available in version 1.4.3

> pyparsing is available in version 2.0.3

> tables is available in version 3.2.0

> mayavi (optional) is available in version 4.4.0

> sympy (optional) is available in version 0.7.6

> igakit (optional) is available in version 0.1

> petsc4py (optional) is missing; you may get run-time errors

> mpi4py (optional) is available in version 1.3, but >= 1.3.1 is needed; you may get run-time errors

> pymetis (optional) is available in version 2014.1


Any thoughts on why so many tests are failing?
I can post other console output if needed.

Thanks,
Fred

Robert Cimrman

unread,
Aug 10, 2015, 2:58:01 PM8/10/15
to sfepy...@googlegroups.com
On 08/10/2015 06:47 PM, Fred Hohman wrote:
> Hi,
>
> Apologies for the late response.
>
> I think I have installed SfePy, but when I run `run_tests.py` I receive the
> following:
>
>> 91 test file(s) executed in 1.42 s, 105 failure(s) of 116 test(s)

If I run

python setup.py clean --all

and then run the tests, I get exactly the same number of failures.

This looks like the extension modules were not built correctly. Try removing
build/ directory, and run (in the sfepy top-level directory, where the sources
were unpacked):

python setup.py clean --all
python setup.py build_ext --inplace

python run_tests.py
python run_tests.py --debug

If something goes wrong, post the output here, please.

>
> In terms of required and optional packages, I receive the following when
> installing via `setup.py`:
>
>> cython is available in version 0.22.1
>
>> numpy is available in version 1.9.2
>
>> scipy is available in version 0.15.1
>
>> matplotlib is available in version 1.4.3
>
>> pyparsing is available in version 2.0.3
>
>> tables is available in version 3.2.0
>
>> mayavi (optional) is available in version 4.4.0

>> sympy (optional) is available in version 0.7.6
>
>> igakit (optional) is available in version 0.1
>
>> petsc4py (optional) is missing; you may get run-time errors
>
>> mpi4py (optional) is available in version 1.3, but >= 1.3.1 is needed;
> you may get run-time errors
>
>> pymetis (optional) is available in version 2014.1

This seems ok, only see [1].

[1] https://github.com/sfepy/sfepy/issues/292

> Any thoughts on why so many tests are failing?
> I can post other console output if needed.

Yes, see above.

r.

Fred Hohman

unread,
Aug 10, 2015, 3:14:30 PM8/10/15
to sfepy-devel
Thanks for the info—your solution has helped!
I now only have one test that has failed, namely:
---   test_eigenvalue_solvers: failed!
and the summary says:
91 test file(s) executed in 203.30 s, 1 failure(s) of 143 test(s)

When running the debug flag I believe this is the error output:

>>> <type 'exceptions.ValueError'>
Traceback (most recent call last):
  File "run_tests.py", line 206, in <module>
    main()
  File "run_tests.py", line 200, in main
    op.walk(options.test_dir, run_tests, stats)
  File "/Users/fredhohman/anaconda/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "run_tests.py", line 131, in run_tests
    n_fail, n_total, test_time = run_test(conf_name, options)
  File "run_tests.py", line 99, in run_test
    ok, n_fail, n_total = test.run(options.debug)
  File "/Users/fredhohman/anaconda/sfepy/sfepy/base/testing.py", line 58, in run
    ret = test_method()
  File "/Users/fredhohman/anaconda/sfepy/tests/test_eigenvalue_solvers.py", line 115, in test_eigenvalue_solvers
    eig_solver = Solver.any_from_conf(eig_conf)
  File "/Users/fredhohman/anaconda/sfepy/sfepy/solvers/__init__.py", line 24, in any_from_conf
    return solver_table[conf.kind](conf, **kwargs)
  File "/Users/fredhohman/anaconda/sfepy/sfepy/solvers/eigen.py", line 257, in __init__
    'cannot import pysparse eigensolvers!')
  File "/Users/fredhohman/anaconda/sfepy/sfepy/base/base.py", line 187, in try_imports
    raise ValueError('\n'.join(msgs))
ValueError: No module named pysparse
No module named pysparse.eigen
cannot import pysparse eigensolvers!

Thanks,
Fred

Robert Cimrman

unread,
Aug 10, 2015, 3:41:23 PM8/10/15
to sfepy...@googlegroups.com
This is ok - the error can be resolved by installing pysparse. I will add a
version check into setup.py, so that a warning is displayed like it is done for
the other optional packages.

So, problem solved :)

r.

Fred Hohman

unread,
Aug 10, 2015, 3:42:20 PM8/10/15
to sfepy-devel
Thanks so much! 
Fred
Reply all
Reply to author
Forward
0 new messages