Repository navigation
Closed
Description
Bug report
Bug summary
On a development build from source, I cannot run the ticks_and_spines/tick-locators.py example, because I get a symbol not found error due to the _path module.
Code for reproduction
python examples/ticks_and_spines/tick-locators.pyActual outcome
Traceback (most recent call last):
File "examples/ticks_and_spines/tick-locators.py", line 10, in <module>
import matplotlib.pyplot as plt
File "/Users/pbos/sw/src/git/matplotlib/lib/matplotlib/pyplot.py", line 29, in <module>
import matplotlib.colorbar
File "/Users/pbos/sw/src/git/matplotlib/lib/matplotlib/colorbar.py", line 28, in <module>
import matplotlib.artist as martist
File "/Users/pbos/sw/src/git/matplotlib/lib/matplotlib/artist.py", line 16, in <module>
from .path import Path
File "/Users/pbos/sw/src/git/matplotlib/lib/matplotlib/path.py", line 17, in <module>
from . import _path, rcParams
ImportError: dlopen(/Users/pbos/sw/src/git/matplotlib/lib/matplotlib/_path.cpython-36m-darwin.so, 2): Symbol not found: __ZNSs4_Rep20_S_empty_rep_storageE
Referenced from: /Users/pbos/sw/src/git/matplotlib/lib/matplotlib/_path.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/pbos/sw/src/git/matplotlib/lib/matplotlib/_path.cpython-36m-darwin.soExpected outcome
A plot with the tick locators. I am able to produce this plot with the conda-installed matplotlib in my default environment.
Matplotlib version
- Operating system: macOS High Sierra (10.13.3)
- Matplotlib version: master
- Matplotlib backend (
print(matplotlib.get_backend())): MacOSX - Python version: 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:14:23) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
I built matplotlib from source. The build setup output:
BUILDING MATPLOTLIB
matplotlib: yes [1.5.1+9314.gade70d705.dirty]
python: yes [3.6.5 |Anaconda, Inc.| (default, Mar 29 2018,
13:14:23) [GCC 4.2.1 Compatible Clang 4.0.1
(tags/RELEASE_401/final)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.14.2]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 2.9.0]
png: yes [version 1.6.34]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt5agg: no [PySide2 not found; PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
Metadata
Metadata
Assignees
Labels
No labels
Activity
egpbos commentedon Apr 9, 2018
Changing backend does not help (default was macosx, also tried Agg and TkAgg).
egpbos commentedon Apr 9, 2018
A bit more info on the environment setup. I first clone and enter the matplotlib repo directory. Then I build the conda env:
conda create -n mpl_dev matplotlib clang libpng freetype conda activate mpl_dev conda uninstall matplotlib rehash # or hash -r for bash, I'm on zshI then build, but specify the compilers manually, to make sure it doesn't accidentally pick up some MacPorts or system gcc version:
I also tried everything using
pythonw(conda install python.app), but this gives the same result. Also tried installing without the-eflag, again same result.QuLogic commentedon Apr 9, 2018
Commit ade70d7 does not exist. There were also less than 9314 commits between 1.5.1 and 2.2.2, so your clone is out-of-date. Please fetch upstream tags to get a reasonable version number.
This should be
CXX=clang++.egpbos commentedon Apr 9, 2018
@QuLogic I was indeed wondering about that, thanks for the tip. I did have the latest commits, just not the tags.
The
clang++tip did the trick though, thanks a lot!For completeness' sake:
conda install clangxx.RuntimeError: Python is not installed as a framework.which is due to the macosx backend. Running with pythonw (installed withconda install python.app) fixes that and runs the test again.egpbos commentedon Apr 9, 2018
Just to summarize, here's what I need to get it correctly installed from scratch (inside a clean matplotlib clone):
And then run with
pythonwto use the macosx backend (or switch to Agg or TkAgg in matplotlibrc).