pybind / pybind/python_example
Libopenblas issues in conda build when adding <pybind11/numpy.h> functionality on OSX
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 530
- Forks
- 150
- Merge moyen
- 8 j 2 h
- PR mergées (30 j)
- 1
Description
If I clone this repo, it works great. If I add some simple pybind11/numpy functionality (passing a numpy array in and out), I run into trouble on OSX, when trying to build a conda package.
- Doing a pip install in my conda env is fine; compiles, links, passes tests. Though I have not tried relocating the wheel to another env than the one it is built in, which I suspect might trigger the same problem.
- The conda build works just fine on linux.
- Obviously, I did add numpy to both my host and run requirements. But it cant find libopenblas when invoking the test. libopenblas and liblapack are in the test environment as you would expect, them being a numpy dependency.
- Problem happens regardless of python version on OSX
Perhaps adding a little pybind/numpy to this example repo would be cool. Probably this is something simple that more seasoned OSX-linking-gurus can spot easily, but it eludes me after a few days of messing around with it.
Here is what the conda build tests have to say:
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_pyopcode.py:1: in <module>
import numpy as np
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/__init__.py:142: in <module>
from . import add_newdocs
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/add_newdocs.py:13: in <module>
from numpy.lib import add_newdoc
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/lib/__init__.py:8: in <module>
from .type_check import *
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/lib/type_check.py:11: in <module>
import numpy.core.numeric as _nx
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.8/site-packages/numpy/core/__init__.py:14: in <module>
from . import multiarray
E ImportError: dlopen($PREFIX/lib/python3.8/site-packages/numpy/core/multiarray.cpython-38-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib
E Referenced from: $PREFIX/lib/python3.8/site-packages/numpy/core/multiarray.cpython-38-darwin.so
E Reason: image not found
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire l’échec de conda-build sous OSX dans l’environnement de test, en utilisant tests/test_pyopcode.py et son importation de numpy comme point d’entrée. Examinez comment le paquet conda et l’environnement de test exposent libopenblas, puis vérifiez que numpy s’importe correctement et que les tests existants réussissent sous OSX.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- numpy, python
- Domaine
- build-system
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100