{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11383","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11383/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11383/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11383/events","html_url":"https://github.com/pydata/pandas/issues/11383","id":112359321,"number":11383,"title":"ValueError: numpy.dtype has the wrong size, try recompiling","user":{"login":"anentropic","id":147840,"avatar_url":"https://avatars.githubusercontent.com/u/147840?v=3","gravatar_id":"","url":"https://api.github.com/users/anentropic","html_url":"https://github.com/anentropic","followers_url":"https://api.github.com/users/anentropic/followers","following_url":"https://api.github.com/users/anentropic/following{/other_user}","gists_url":"https://api.github.com/users/anentropic/gists{/gist_id}","starred_url":"https://api.github.com/users/anentropic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anentropic/subscriptions","organizations_url":"https://api.github.com/users/anentropic/orgs","repos_url":"https://api.github.com/users/anentropic/repos","events_url":"https://api.github.com/users/anentropic/events{/privacy}","received_events_url":"https://api.github.com/users/anentropic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Build","name":"Build","color":"75507B"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-20T12:41:22Z","updated_at":"2015-10-20T13:27:49Z","closed_at":"2015-10-20T12:56:21Z","body":"I have been setting up a new CI server and I'm hitting a problem when running our tests on the new server - tests which use Pandas are giving this error:\r\n\r\n```\r\nFile \"/root/.virtualenvs/myproject/local/lib/python2.7/site-packages/pandas/__init__.py\", line 7, in <module>\r\n    from . import hashtable, tslib, lib\r\n  File \"pandas/src/numpy.pxd\", line 157, in init pandas.lib (pandas/lib.c:78660)\r\nValueError: numpy.dtype has the wrong size, try recompiling\r\n```\r\n\r\nI have read other threads about the cause of this problem but they don't seem to apply in my case.\r\n\r\nWe are running in a virtualenv, inside a Docker container (Debian Stretch).\r\n\r\nThere is no 'system' numpy, pandas or cython installed:\r\n```\r\nroot@e00c968153d1:/# pip freeze | grep -i numpy\r\nroot@e00c968153d1:/# pip freeze | grep -i pandas\r\nroot@e00c968153d1:/# pip freeze | grep -i cython\r\n```\r\n\r\nIn our requirements.txt we have:\r\n```\r\nnumpy==1.9.1\r\npandas==0.15.2\r\n```\r\n\r\nbut...\r\n```\r\n$ workon myproject\r\n$ ipython\r\nIn [1]: import numpy\r\nIn [2]: numpy.version.full_version\r\nOut[2]: '1.9.1'\r\nIn [3]: import pandas\r\nnumpy.dtype has the wrong size, try recompiling\r\n```\r\n\r\nNow, I have found a manual fix, which is to re-install pandas:\r\n```\r\n$ pip uninstall pandas\r\n$ pip install --no-cache-dir pandas==0.15.2\r\n```\r\n\r\nThe need for `--no-cache-dir` suggests something about the problem, but I don't understand what exactly.  I am installing in a 'virgin' docker container, there is no pip cache before I first install requirements.txt:\r\n```\r\n$ ls -l /root/.cache/pip/wheels\r\n$ ls: cannot access /root/.cache/pip/wheels: No such file or directory\r\n```\r\n\r\nAfter `pip install -r requirements.txt`:\r\n```\r\n$ locate pandas\r\n/root/.cache/pip/wheels/f7/7b/7c/6de5614135da1e25d864beec01ed40bb43fcafdeda870a05f6/pandas-0.15.2-cp27-none-linux_x86_64.whl\r\n/root/.virtualenvs/myproject/lib/python2.7/site-packages/pandas\r\n...\r\n(only one installation of pandas found)\r\n```\r\n\r\nThe manual fix is not acceptable as I need to automate the build.\r\n\r\nAppreciate if you can suggest other avenues to explore towards a solution."},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/149568153","html_url":"https://github.com/pydata/pandas/issues/11383#issuecomment-149568153","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11383","id":149568153,"user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T13:27:49Z","updated_at":"2015-10-20T13:27:49Z","body":"as I said this is an issue with you system. it is likely cached. \r\n\r\nor pip might be at fault. IOW it tries to complete the install of pandas, then installs numpy, but its not installed so pandas can't find it. you can try to install numpy first. then with a new pip command install pandas. "}}