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

show() cannot find xdpyinfo in python3 on Mac OS-X / Quartz installation #135

Open
graik opened this issue Jul 28, 2018 · 1 comment
Open

Comments

@graik
Copy link

graik commented Jul 28, 2018

biggles 1.7.2 installed via pip in python 3.7 on Max OS-X 10.11.6; plotutils etc dependencies are all satisfied. Standard Quartz installation for X11.

The following test snippet fails in python 3.7 but works in python 2.x:

    import biggles, numpy
    x = numpy.arange(0,10,0.3)
    p = biggles.FramedPlot()
    p.add( biggles.Curve(x, numpy.cos(x)) )
    p.show()

Error:

>>> p.show()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/biggles/biggles.py", line 2527, in show
    self.show_x11(width, height)
  File "/usr/local/lib/python3.7/site-packages/biggles/biggles.py", line 2544, in show_x11
    if not X11_is_running():
  File "/usr/local/lib/python3.7/site-packages/biggles/biggles.py", line 43, in X11_is_running
    p = Popen(["xdpyinfo"], stdout=PIPE, stderr=PIPE)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'xdpyinfo': 'xdpyinfo'

Work around:

xdpyinfo does in fact exist on this system but it is not found in the $PATH::

~> locate xdpyinfo
/opt/X11/bin/xdpyinfo

Adding /opt/X11/bin to PATH solves the issue, at least temporarily:

export PATH=$PATH:/opt/X11/bin

Now, the same code executes, Quartz is started and the plot window is shown.

@esheldon
Copy link
Collaborator

thanks for the report.

I don't have a macintosh, can one of the other developers please verify this and put in a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants