Problem with Cython

:tada: Minor breakthrough :tada:
using export | grep clang I was able to identify some other environment variables.

CC=x86_64-apple-darwin13.4.0-clang
CLANG=/Users/adam/opt/anaconda3/envs/neuroenv/bin/x86_64-apple-darwin13.4.0-clang
CLANGXX=/Users/adam/opt/anaconda3/envs/neuroenv/bin/x86_64-apple-darwin13.4.0-clang++
CXX=x86_64-apple-darwin13.4.0-clang++

So i updated $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh to replace these with gcc and g++ and now the brian2 tests (include Cython related ones) pass!

successful test report
 brian2.test()
Running tests in /Users/adam/opt/anaconda3/envs/neuroenv_braindev/lib/python3.8/site-packages/brian2 for targets numpy, cython (excluding long tests)
Running Brian version 2.4.2.post0.dev317 from '/Users/adam/opt/anaconda3/envs/neuroenv_braindev/lib/python3.8/site-packages/brian2'
Testing codegen-independent code
Resetting to default preferences

Running doctests
..........................................                                                                                                                                          [100%]
42 passed in 23.06s
Running tests that do not use code generation
................................................................................................................................................................................... [ 49%]
................................................................................................................................................................................... [ 98%]
......                                                                                                                                                                              [100%]
364 passed, 321 deselected in 238.90s (0:03:58)
Running tests for target numpy:
....s...............................ssssss......................................................................................................................................... [ 66%]
............................................................................................                                                                                        [100%]
264 passed, 7 skipped, 414 deselected in 329.04s (0:05:29)
Running tests for target cython:
....s..............................s......s...s......s...............................................s...........s................................................................. [ 66%]
..............................................................ss............................                                                                                        [100%]
262 passed, 9 skipped, 414 deselected in 316.08s (0:05:16)
OK: 4/4 test suite(s) did complete successfully.
True

I’ve written a quick markdown guide that retraces the steps I used:

override_CXX_in_conda_env.md

i’m going to go back through and see

  • whether setting CC, CLANG were necessary
  • whether this means I can now use cython as a codegen target within brian
2 Likes