{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5904","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5904/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5904/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5904/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/5904","id":118304325,"number":5904,"title":"ImportError: Numerical Python (NumPy) is not installed. ","user":{"login":"napsternxg","id":112678,"avatar_url":"https://avatars.githubusercontent.com/u/112678?v=3","gravatar_id":"","url":"https://api.github.com/users/napsternxg","html_url":"https://github.com/napsternxg","followers_url":"https://api.github.com/users/napsternxg/followers","following_url":"https://api.github.com/users/napsternxg/following{/other_user}","gists_url":"https://api.github.com/users/napsternxg/gists{/gist_id}","starred_url":"https://api.github.com/users/napsternxg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napsternxg/subscriptions","organizations_url":"https://api.github.com/users/napsternxg/orgs","repos_url":"https://api.github.com/users/napsternxg/repos","events_url":"https://api.github.com/users/napsternxg/events{/privacy}","received_events_url":"https://api.github.com/users/napsternxg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-11-23T01:34:58Z","updated_at":"2015-11-25T00:02:35Z","closed_at":null,"body":"I am trying to upgrade my sklearn from version 0.16.1 to the latest using pip however the `sudo pip install sklearn --upgrade` command fails with the following message:\r\n\r\n```\r\n$ sudo pip install sklearn --upgrade\r\nRequirement already up-to-date: sklearn in /usr/local/lib/python2.7/dist-packages\r\nCollecting scikit-learn (from sklearn)\r\n  Using cached scikit-learn-0.17.tar.gz\r\nInstalling collected packages: scikit-learn\r\n  Found existing installation: scikit-learn 0.16.1\r\n    Uninstalling scikit-learn-0.16.1:\r\n      Successfully uninstalled scikit-learn-0.16.1\r\n  Running setup.py install for scikit-learn\r\n    Complete output from command /usr/bin/python -c \"import setuptools, tokenize;__file__='/tmp/pip-build-IEvJKv/scikit-learn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-Qo0d9N-record/install-record.txt --single-version-externally-managed --compile:\r\n    Partial import of sklearn during the build process.\r\n    Traceback (most recent call last):\r\n      File \"<string>\", line 1, in <module>\r\n      File \"/tmp/pip-build-IEvJKv/scikit-learn/setup.py\", line 247, in <module>\r\n        setup_package()\r\n      File \"/tmp/pip-build-IEvJKv/scikit-learn/setup.py\", line 227, in setup_package\r\n        .format(numpy_req_str, instructions))\r\n    ImportError: Numerical Python (NumPy) is not installed.\r\n    scikit-learn requires NumPy >= 1.6.1.\r\n    Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html\r\n    \r\n    \r\n    ----------------------------------------\r\n  Rolling back uninstall of scikit-learn\r\nCommand \"/usr/bin/python -c \"import setuptools, tokenize;__file__='/tmp/pip-build-IEvJKv/scikit-learn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-Qo0d9N-record/install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in /tmp/pip-build-IEvJKv/scikit-learn\r\n\r\n```\r\n\r\nI already have numpy 1.10.1 installed as found in \r\n```\r\n$ python -c \"import numpy; print numpy.__version__\"\r\n1.10.1\r\n```\r\n\r\nMy pip version is also up to date \r\n```\r\n$ sudo pip --version\r\npip 7.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)\r\n```\r\n\r\nI manually installed numpy from source using OpenBLAS 0.2.16.dev using the pip command from the source directory.\r\n\r\n```\r\n# Install OpenBLAS at /usr/local/\r\ncd numpy-1.10.1\r\nsudo pip install . --upgrade\r\n```"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/159443659","html_url":"https://github.com/scikit-learn/scikit-learn/issues/5904#issuecomment-159443659","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5904","id":159443659,"user":{"login":"rvraghav93","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/rvraghav93","html_url":"https://github.com/rvraghav93","followers_url":"https://api.github.com/users/rvraghav93/followers","following_url":"https://api.github.com/users/rvraghav93/following{/other_user}","gists_url":"https://api.github.com/users/rvraghav93/gists{/gist_id}","starred_url":"https://api.github.com/users/rvraghav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvraghav93/subscriptions","organizations_url":"https://api.github.com/users/rvraghav93/orgs","repos_url":"https://api.github.com/users/rvraghav93/repos","events_url":"https://api.github.com/users/rvraghav93/events{/privacy}","received_events_url":"https://api.github.com/users/rvraghav93/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T00:02:35Z","updated_at":"2015-11-25T00:02:35Z","body":"Ah! Try this?\r\n\r\n```sh\r\n$ sudo chown -R smishra8:smishra8 /usr/local/lib/python2.7/\r\n$ pip install --upgrade scikit-learn\r\n```\r\n\r\nI think this should work (assuming you are able to run `chown` with elevated privileges...)"}}