{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/1823","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/1823/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/1823/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/1823/events","html_url":"https://github.com/matplotlib/matplotlib/issues/1823","id":12046781,"number":1823,"title":"Cannot import matplotlib on Google App Engine dev appserver","user":{"login":"mgiuca-google","id":2383378,"avatar_url":"https://avatars.githubusercontent.com/u/2383378?v=3","gravatar_id":"","url":"https://api.github.com/users/mgiuca-google","html_url":"https://github.com/mgiuca-google","followers_url":"https://api.github.com/users/mgiuca-google/followers","following_url":"https://api.github.com/users/mgiuca-google/following{/other_user}","gists_url":"https://api.github.com/users/mgiuca-google/gists{/gist_id}","starred_url":"https://api.github.com/users/mgiuca-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgiuca-google/subscriptions","organizations_url":"https://api.github.com/users/mgiuca-google/orgs","repos_url":"https://api.github.com/users/mgiuca-google/repos","events_url":"https://api.github.com/users/mgiuca-google/events{/privacy}","received_events_url":"https://api.github.com/users/mgiuca-google/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-03-15T01:16:03Z","updated_at":"2016-03-01T20:45:28Z","closed_at":"2013-04-17T01:24:10Z","body":"Google App Engine is a restricted Python environment which now supports matplotlib on the production server (see [Third-party Libraries](https://developers.google.com/appengine/docs/python/tools/libraries27#matplotlib)), due to extensive modifications which Google made to the codebase to get it working. However, the [development server](https://developers.google.com/appengine/docs/python/tools/devserver) runs unmodified code for third-party libraries. The current version of Matplotlib (tested with 9690232 as of 14-03-2013) crashes if \"`import matplotlib`\" is run on the dev appserver:\r\n\r\n    Traceback (most recent call last):\r\n      File \"/path/to/matplotlib/__init__.py\", line 846, in <module>\r\n        rcParams = rc_params()\r\n      File \"/path/to/matplotlib/__init__.py\", line 757, in rc_params\r\n        fname = matplotlib_fname()\r\n      File \"/path/to/matplotlib/__init__.py\", line 646, in matplotlib_fname\r\n        home = get_home()\r\n      File \"/path/to/matplotlib/__init__.py\", line 300, in wrapper\r\n        ret = func(*args, **kwargs)\r\n      File \"/path/to/matplotlib/__init__.py\", line 496, in _get_home\r\n        raise RuntimeError('please define environment variable $HOME')\r\n    RuntimeError: please define environment variable $HOME\r\n\r\nThis is just one of the issues (fix that one, and more spring up). There are three major blockers:\r\n* Matplotlib expects the user to have a writable $HOME directory, so it will not work in any environment where the user does not have a home directory, or where there is a non-writable file system.\r\n* App Engine does provide a `subprocess` module, but it is empty. Therefore, any attempt to use `subprocess.Popen` on App Engine results in `AttributeError` being raised.\r\n* The `ps` backend writes to a temporary file, then reads it back in, even when not using an external distiller. This will not work in any environment where there is a non-writable file system.\r\n\r\nWe (the Google App Engine Python team) have patched these three issues to get Matplotlib working in our production environment. We propose sending these patches upstream so that Matplotlib will work out-of-the-box on App Engine and other restricted environments which ban file writing and use of subprocess."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/190893750","html_url":"https://github.com/matplotlib/matplotlib/issues/1823#issuecomment-190893750","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/1823","id":190893750,"user":{"login":"jonathan-s","id":2124818,"avatar_url":"https://avatars.githubusercontent.com/u/2124818?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathan-s","html_url":"https://github.com/jonathan-s","followers_url":"https://api.github.com/users/jonathan-s/followers","following_url":"https://api.github.com/users/jonathan-s/following{/other_user}","gists_url":"https://api.github.com/users/jonathan-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathan-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathan-s/subscriptions","organizations_url":"https://api.github.com/users/jonathan-s/orgs","repos_url":"https://api.github.com/users/jonathan-s/repos","events_url":"https://api.github.com/users/jonathan-s/events{/privacy}","received_events_url":"https://api.github.com/users/jonathan-s/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T20:45:28Z","updated_at":"2016-03-01T20:45:28Z","body":"@mgiuca-google Is the above still valid?"}}