{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/237","labels_url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/237/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/237/events","html_url":"https://github.com/Homebrew/homebrew-python/issues/237","id":94747222,"number":237,"title":"Must use Python with unicode enabled when including arrayobject.h","user":{"login":"kilojoules","id":8032238,"avatar_url":"https://avatars.githubusercontent.com/u/8032238?v=3","gravatar_id":"","url":"https://api.github.com/users/kilojoules","html_url":"https://github.com/kilojoules","followers_url":"https://api.github.com/users/kilojoules/followers","following_url":"https://api.github.com/users/kilojoules/following{/other_user}","gists_url":"https://api.github.com/users/kilojoules/gists{/gist_id}","starred_url":"https://api.github.com/users/kilojoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilojoules/subscriptions","organizations_url":"https://api.github.com/users/kilojoules/orgs","repos_url":"https://api.github.com/users/kilojoules/repos","events_url":"https://api.github.com/users/kilojoules/events{/privacy}","received_events_url":"https://api.github.com/users/kilojoules/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-13T15:26:29Z","updated_at":"2015-07-13T15:55:00Z","closed_at":null,"body":"I can't include numpy's `arrayobject.h` header file. I get an error message stating that I `Must use Python with unicode enabled`. To counter this, I tried `export LANG=cs_CZ.UTF-8` and `export PYTHONIOENCODING=utf-8`. However, I am unable to overcome this issue.\r\n\r\n    $ cat ex.cpp \r\n    #include <numpy/arrayobject.h>\r\n\r\n    $ clang -I/usr/local/lib/python2.7/site-packages/numpy/core/include ex.cpp \r\n    In file included from ex.cpp:1:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:4:\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:164:9: error: unknown type name 'Py_intptr_t'\r\n    typedef Py_intptr_t npy_intp;\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:165:9: error: unknown type name 'Py_uintptr_t'; did you mean 'uintptr_t'?\r\n    typedef Py_uintptr_t npy_uintp;\r\n            ^~~~~~~~~~~~\r\n            uintptr_t\r\n    /usr/include/sys/_types/_uintptr_t.h:30:24: note: 'uintptr_t' declared here\r\n    typedef unsigned long           uintptr_t;\r\n                                    ^\r\n    In file included from ex.cpp:1:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:4:\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:301:2: error: Must use Python with unicode enabled.\r\n    #error Must use Python with unicode enabled.\r\n     ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:949:9: error: unknown type name 'npy_uint16'\r\n    typedef npy_uint16 npy_half;\r\n            ^\r\n    In file included from ex.cpp:1:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:\r\n    In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:363:9: error: unknown type name 'PyObject'\r\n    typedef PyObject * (PyArray_GetItemFunc) (void *, void *);\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:364:35: error: unknown type name 'PyObject'\r\n    typedef int (PyArray_SetItemFunc)(PyObject *, void *, void *);\r\n                                      ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:391:32: error: unknown type name 'FILE'\r\n    typedef int (PyArray_ScanFunc)(FILE *fp, void *dptr,\r\n                                   ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:513:9: error: unknown type name 'PyObject'\r\n            PyObject *castdict;\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:573:9: error: unknown type name 'PyObject_HEAD'\r\n            PyObject_HEAD\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:580:21: error: expected ';' at end of declaration list\r\n            PyTypeObject *typeobj;\r\n                        ^\r\n                        ;\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:609:9: error: unknown type name 'PyObject'\r\n            PyObject *fields;\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:614:9: error: unknown type name 'PyObject'\r\n            PyObject *names;\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:621:9: error: unknown type name 'PyObject'\r\n            PyObject *metadata;\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:632:9: error: unknown type name 'PyObject'\r\n            PyObject *shape;       /* a tuple */\r\n            ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:647:5: error: unknown type name 'PyObject_HEAD'\r\n        PyObject_HEAD\r\n        ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:649:5: error: expected member name or ';' after declaration specifiers\r\n        char *data;\r\n        ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:677:5: error: unknown type name 'PyObject'\r\n        PyObject *base;\r\n        ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:683:5: error: unknown type name 'PyObject'\r\n        PyObject *weakreflist;\r\n        ^\r\n    /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:707:9: error: unknown type name 'PyObject_HEAD'\r\n            PyObject_HEAD\r\n            ^\r\n    fatal error: too many errors emitted, stopping now [-ferror-limit=]\r\n    20 errors generated.\r\n    $ "},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/comments/120976614","html_url":"https://github.com/Homebrew/homebrew-python/issues/237#issuecomment-120976614","issue_url":"https://api.github.com/repos/Homebrew/homebrew-python/issues/237","id":120976614,"user":{"login":"kilojoules","id":8032238,"avatar_url":"https://avatars.githubusercontent.com/u/8032238?v=3","gravatar_id":"","url":"https://api.github.com/users/kilojoules","html_url":"https://github.com/kilojoules","followers_url":"https://api.github.com/users/kilojoules/followers","following_url":"https://api.github.com/users/kilojoules/following{/other_user}","gists_url":"https://api.github.com/users/kilojoules/gists{/gist_id}","starred_url":"https://api.github.com/users/kilojoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilojoules/subscriptions","organizations_url":"https://api.github.com/users/kilojoules/orgs","repos_url":"https://api.github.com/users/kilojoules/repos","events_url":"https://api.github.com/users/kilojoules/events{/privacy}","received_events_url":"https://api.github.com/users/kilojoules/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T15:55:00Z","updated_at":"2015-07-13T15:55:00Z","body":"I am able to `#include <numpy/arrayobject.h>` when compiling established source codes. I must be doing something wrong"}}