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

test_wheels.sh fails on macOS #2374

Open
olupton opened this issue Jun 6, 2023 · 0 comments
Open

test_wheels.sh fails on macOS #2374

olupton opened this issue Jun 6, 2023 · 0 comments
Labels

Comments

@olupton
Copy link
Collaborator

olupton commented Jun 6, 2023

Context

In the course of investigating a failure in the test_wheels.sh script(*) I tried running it on my laptop.

(*) https://bbpgitlab.epfl.ch/hpc/cellular/neuron-gpu-wheel-testing/-/jobs/745602 uses this script for neuron-gpu-nightly, and it started failing when #2027 was merged.

Overview of the issue

 % MAKEFLAGS=" --max-load 0.0" bash packaging/python/test_wheels.sh python neuron-nightly
...
+ nrnivmodl -coreneuron 'test/coreneuron/mod files/'
...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = '/Users/runner/work/1/s/build/temp.macosx-10.9-x86_64-cpython-310/lib::/Users/olupton/build/nrn/nrn_test_venv_310/lib/python3.10/site-packages/neuron/.data/lib/python'
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/Users/olupton/build/nrn/nrn_test_venv_310/lib/python3.10/site-packages/neuron/.data/bin/nmodl'
  sys.base_prefix = '/Library/Frameworks/Python.framework/Versions/3.10'
  sys.base_exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.10'
  sys.platlibdir = 'lib'
  sys.executable = '/Users/olupton/build/nrn/nrn_test_venv_310/lib/python3.10/site-packages/neuron/.data/bin/nmodl'
  sys.prefix = '/Library/Frameworks/Python.framework/Versions/3.10'
  sys.exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.10'
  sys.path = [
    '/Users/runner/work/1/s/build/temp.macosx-10.9-x86_64-cpython-310/lib',
    '',
    '/Users/olupton/build/nrn/nrn_test_venv_310/lib/python3.10/site-packages/neuron/.data/lib/python',
    '/Library/Frameworks/Python.framework/Versions/3.10/lib/python310.zip',
    '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10',
    '/Library/Frameworks/Python.framework/Versions/3.10/lib/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007ff84ead3340 (most recent call first):
  <no Python frame>
make: *** [x86_64/corenrn/mod2c/axial_pp.cpp] Error 1
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
Traceback (most recent call last):
  File "/Users/olupton/build/nrn/nrn_test_venv_310/bin/nrnivmodl", line 121, in <module>
    subprocess.check_call([exe, *sys.argv[1:]])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/olupton/build/nrn/nrn_test_venv_310/lib/python3.10/site-packages/neuron/.data/bin/nrnivmodl', '-coreneuron', 'test/coreneuron/mod files/']' returned non-zero exit status 2.

where MAKEFLAGS=" --max-load 0.0" is just a lazy way of disabling the internal parallelism from make -j 4

I note:

  • /Users/runner/work/1/s/build/temp.macosx-10.9-x86_64-cpython-310/lib is probably a path from the machine that built the wheel
  • This is coming from the Python interpreter embedded inside NMODL
  • We only recently switched to using NMODL in this context

While there is probably no direct link, the original motivation of #2317 was to use new Python APIs to get a Python environment inside nrniv and special that was more aligned with the Python environment obtained by launching python.

Expected result/behavior

This should work.

NEURON setup

  • Version: test_wheels.sh is coming from the master branch, the wheel is today's neuron-nightly build
  • Installation method: git checkout for the test script, pip install for the wheel
  • OS + Version: macOS 13.3
  • Compiler + Version: AppleClang
@olupton olupton added the bug label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant