Build dependency cycle due to pythran/networkx
See original GitHub issueWhen I build from source on macOS 11.4 I get the following error:
ImportError while importing test module '/Users/dlindelof/Private/scipy/build/testenv/lib/python3.8/site-packages/scipy/stats/tests/test_tukeylambda_stats.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
scipy/stats/__init__.py:441: in <module>
from .stats import *
scipy/stats/stats.py:37: in <module>
from scipy.spatial.distance import cdist
scipy/spatial/__init__.py:102: in <module>
from ._geometric_slerp import geometric_slerp
scipy/spatial/_geometric_slerp.py:8: in <module>
from scipy.spatial.distance import euclidean
scipy/spatial/distance.py:124: in <module>
from ..special import rel_entr
scipy/special/__init__.py:643: in <module>
from . import _ufuncs
E ImportError: dlopen(/Users/dlindelof/Private/scipy/build/testenv/lib/python3.8/site-packages/scipy/special/_ufuncs.cpython-38-darwin.so, 2): Symbol not found: _cephes_cosdg
E Referenced from: /Users/dlindelof/Private/scipy/build/testenv/lib/python3.8/site-packages/scipy/special/_ufuncs.cpython-38-darwin.so
E Expected in: flat namespace
E in /Users/dlindelof/Private/scipy/build/testenv/lib/python3.8/site-packages/scipy/special/_ufuncs.cpython-38-darwin.so
Scipy/Numpy/Python version information:
These are the first lines I get when I start the build/tests:
$ python runtests.py -v
Building, see build.log...
Build OK (0:00:12.526099 elapsed)
=================================================== test session starts ===================================================
platform darwin -- Python 3.8.2, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /Users/dlindelof/Private/scipy/.venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/dlindelof/Private/scipy, configfile: pytest.ini
The build seems ok, I installed OpenBLAS via Homebrew and set the path in site.cfg
like this:
[openblas]
libraries = openblas
library_dirs = /usr/local/Cellar/openblas/0.3.15_1/lib
include_dirs = /usr/local/Cellar/openblas/0.3.15_1/include
runtime_library_dirs = /usr/local/Cellar/openblas/0.3.15_1/lib
I was able to build and run the tests for numpy
in another repository without problems.
Issue Analytics
- State:
- Created 2 years ago
- Comments:38 (35 by maintainers)
Top Results From Across the Web
Analyzing software dependencies with networkX
I wanted find out a minimal conda-requirements.txt file for my projects using only the information from the conda-recipes repository.
Read more >find_cycle — NetworkX 2.8.8 documentation
Returns a cycle found via depth-first traversal. The cycle is a list of edges indicating the cyclic path. Orientation of directed edges is...
Read more >Juan Luis Cano Rodríguez on Twitter: "The tale of a circular build ...
Build dependency cycle due to pythran/networkx · Issue #14335 · scipy/scipy. When I build from source on macOS 11.4 I get the following...
Read more >How can I find circular relations in a graph with Python and ...
networkx.simple_cycles does this for you. >>> import networkx as nx >>> G = nx. ... Use Depth-First Search to detect cycles in a...
Read more >How To Design Pipelines and Sort by Dependencies in Python
As we said before, to be able to sort this DAG we should have no cycling dependencies. Since we have created a networkx....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, that’s why I’m confused:
networkx
2.6.0 was released yesterday, until yesterday it indeed only depended ondecorator
and everything else was in extras.Wheels have indeed made our life better, but unfortunately we have to deal with various from-source build scenarios as well. Both platforms without wheels (AIX, Alpine Linux, PowerPC, even macOS M1 still), and people who use
pip install --no-binary
for some reason (could be to build optimized binaries, or to work around some bug, or maybe other reasons too).I do think NetworkX depending on NumPy is reasonable, and should not be too much of a problem (and Pythran depends on NumPy too). Perhaps even SciPy, depending on how important
sparse.csgraph
andlinalg
are. Why it should depend on pandas and especially Matplotlib is more questionable I’d think.