{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/190","labels_url":"https://api.github.com/repos/matplotlib/basemap/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/basemap/issues/190/comments","events_url":"https://api.github.com/repos/matplotlib/basemap/issues/190/events","html_url":"https://github.com/matplotlib/basemap/issues/190","id":82299766,"number":190,"title":"Basemap depends on gtk and requires a XServer Display","user":{"login":"AndreLobato","id":359120,"avatar_url":"https://avatars.githubusercontent.com/u/359120?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreLobato","html_url":"https://github.com/AndreLobato","followers_url":"https://api.github.com/users/AndreLobato/followers","following_url":"https://api.github.com/users/AndreLobato/following{/other_user}","gists_url":"https://api.github.com/users/AndreLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreLobato/subscriptions","organizations_url":"https://api.github.com/users/AndreLobato/orgs","repos_url":"https://api.github.com/users/AndreLobato/repos","events_url":"https://api.github.com/users/AndreLobato/events{/privacy}","received_events_url":"https://api.github.com/users/AndreLobato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-29T07:04:57Z","updated_at":"2015-05-29T08:07:51Z","closed_at":null,"body":"On version 1.0.7 (tested) if you do, and you don't have a monitor on the machine like a server install:\r\n\r\nTraceback:\r\n\r\n```\r\n----> 1 from mpl_toolkits import basemap\r\n\r\n/home/metocean/.virtualenvs/OpsEnv/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py in <module>()\r\n     29 from matplotlib.transforms import Bbox\r\n     30 from mpl_toolkits.basemap import pyproj\r\n---> 31 from mpl_toolkits.axes_grid1 import make_axes_locatable\r\n     32 from matplotlib.image import imread\r\n     33 import sys, os, math\r\n\r\n/usr/lib64/python2.7/site-packages/mpl_toolkits/axes_grid1/__init__.py in <module>()\r\n      2 from axes_divider import Divider, SubplotDivider, LocatableAxes, \\\r\n      3      make_axes_locatable\r\n----> 4 from axes_grid import Grid, ImageGrid, AxesGrid\r\n      5 #from axes_divider import make_axes_locatable\r\n      6 \r\n\r\n/usr/lib64/python2.7/site-packages/mpl_toolkits/axes_grid1/axes_grid.py in <module>()\r\n      1 import matplotlib.cbook as cbook\r\n      2 \r\n----> 3 import matplotlib.pyplot as plt\r\n      4 import matplotlib.axes as maxes\r\n      5 #import matplotlib.colorbar as mcolorbar\r\n\r\n/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py in <module>()\r\n     95 \r\n     96 from matplotlib.backends import pylab_setup\r\n---> 97 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()\r\n     98 \r\n     99 @docstring.copy_dedent(Artist.findobj)\r\n\r\n/usr/lib64/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()\r\n     23         backend_name = 'matplotlib.backends.%s'%backend_name.lower()\r\n     24     backend_mod = __import__(backend_name,\r\n---> 25                              globals(),locals(),[backend_name])\r\n     26 \r\n     27     # Things we pull in from all backends\r\n\r\n/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py in <module>()\r\n      8 from matplotlib.figure import Figure\r\n      9 from matplotlib.backends.backend_agg import FigureCanvasAgg\r\n---> 10 from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\\\r\n     11      show, draw_if_interactive,\\\r\n     12      error_msg_gtk, NavigationToolbar, PIXELS_PER_INCH, backend_version, \\\r\n\r\n/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_gtk.py in <module>()\r\n     11 try:\r\n     12     import gobject\r\n---> 13     import gtk; gdk = gtk.gdk\r\n     14     import pango\r\n     15 except ImportError:\r\n\r\n/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py in <module>()\r\n     62 keysyms = LazyModule('keysyms', locals())\r\n     63 \r\n---> 64 _init()\r\n     65 \r\n     66 # CAPI\r\n\r\n/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py in _init()\r\n     50     sys_path = sys.path[:]\r\n     51 \r\n---> 52     _gtk.init_check()\r\n     53 \r\n     54     # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''),\r\n\r\nRuntimeError: could not open display\r\n```\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/comments/106737096","html_url":"https://github.com/matplotlib/basemap/issues/190#issuecomment-106737096","issue_url":"https://api.github.com/repos/matplotlib/basemap/issues/190","id":106737096,"user":{"login":"jenshnielsen","id":548266,"avatar_url":"https://avatars.githubusercontent.com/u/548266?v=3","gravatar_id":"","url":"https://api.github.com/users/jenshnielsen","html_url":"https://github.com/jenshnielsen","followers_url":"https://api.github.com/users/jenshnielsen/followers","following_url":"https://api.github.com/users/jenshnielsen/following{/other_user}","gists_url":"https://api.github.com/users/jenshnielsen/gists{/gist_id}","starred_url":"https://api.github.com/users/jenshnielsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenshnielsen/subscriptions","organizations_url":"https://api.github.com/users/jenshnielsen/orgs","repos_url":"https://api.github.com/users/jenshnielsen/repos","events_url":"https://api.github.com/users/jenshnielsen/events{/privacy}","received_events_url":"https://api.github.com/users/jenshnielsen/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T08:07:51Z","updated_at":"2015-05-29T08:07:51Z","body":"You can select the default matplotlib backend and get one that does not require a display\r\neither modify your matplotlibrc file http://matplotlib.org/users/customizing.html \r\nor add it to the top of your script before importing basemap. \r\n\r\n```\r\nimport matplotlib\r\nmatplotlib.use('Agg')\r\n```"}}