python numpy or scipy error

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I want to work in python. When I import scipy or numpy it shows these errors:



saikat@saikat:~/Downloads/Python-2.7.15$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>>


But when I use this commands:



sudo pip install numpy scipy


It shows:



saikat@saikat:~/Downloads/Python-2.7.15$ sudo pip install numpy scipy
The directory '/home/saikat/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/saikat/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages/numpy-1.14.3-py2.7-linux-x86_64.egg (1.14.3)
Requirement already satisfied: scipy in /usr/local/lib/python2.7/dist-packages (1.1.0).


What should I do?







share|improve this question






















  • conda.io/docs/user-guide/tasks/manage-pkgs.html
    – steeldriver
    May 15 at 15:33














up vote
0
down vote

favorite












I want to work in python. When I import scipy or numpy it shows these errors:



saikat@saikat:~/Downloads/Python-2.7.15$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>>


But when I use this commands:



sudo pip install numpy scipy


It shows:



saikat@saikat:~/Downloads/Python-2.7.15$ sudo pip install numpy scipy
The directory '/home/saikat/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/saikat/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages/numpy-1.14.3-py2.7-linux-x86_64.egg (1.14.3)
Requirement already satisfied: scipy in /usr/local/lib/python2.7/dist-packages (1.1.0).


What should I do?







share|improve this question






















  • conda.io/docs/user-guide/tasks/manage-pkgs.html
    – steeldriver
    May 15 at 15:33












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to work in python. When I import scipy or numpy it shows these errors:



saikat@saikat:~/Downloads/Python-2.7.15$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>>


But when I use this commands:



sudo pip install numpy scipy


It shows:



saikat@saikat:~/Downloads/Python-2.7.15$ sudo pip install numpy scipy
The directory '/home/saikat/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/saikat/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages/numpy-1.14.3-py2.7-linux-x86_64.egg (1.14.3)
Requirement already satisfied: scipy in /usr/local/lib/python2.7/dist-packages (1.1.0).


What should I do?







share|improve this question














I want to work in python. When I import scipy or numpy it shows these errors:



saikat@saikat:~/Downloads/Python-2.7.15$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>>


But when I use this commands:



sudo pip install numpy scipy


It shows:



saikat@saikat:~/Downloads/Python-2.7.15$ sudo pip install numpy scipy
The directory '/home/saikat/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/saikat/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages/numpy-1.14.3-py2.7-linux-x86_64.egg (1.14.3)
Requirement already satisfied: scipy in /usr/local/lib/python2.7/dist-packages (1.1.0).


What should I do?









share|improve this question













share|improve this question




share|improve this question








edited May 15 at 14:39









karel

49.8k11106127




49.8k11106127










asked May 15 at 14:37









Saikat Pal

62




62











  • conda.io/docs/user-guide/tasks/manage-pkgs.html
    – steeldriver
    May 15 at 15:33
















  • conda.io/docs/user-guide/tasks/manage-pkgs.html
    – steeldriver
    May 15 at 15:33















conda.io/docs/user-guide/tasks/manage-pkgs.html
– steeldriver
May 15 at 15:33




conda.io/docs/user-guide/tasks/manage-pkgs.html
– steeldriver
May 15 at 15:33










1 Answer
1






active

oldest

votes

















up vote
0
down vote













You have Anaconda Python and not system Python version. Because you use Anaconda, your package should be installed using conda or Anaconda pip version. Using base environment of the default Anaconda installation, Numpy and Scipy are already installed, if not:



conda install numpy scipy





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036565%2fpython-numpy-or-scipy-error%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    You have Anaconda Python and not system Python version. Because you use Anaconda, your package should be installed using conda or Anaconda pip version. Using base environment of the default Anaconda installation, Numpy and Scipy are already installed, if not:



    conda install numpy scipy





    share|improve this answer
























      up vote
      0
      down vote













      You have Anaconda Python and not system Python version. Because you use Anaconda, your package should be installed using conda or Anaconda pip version. Using base environment of the default Anaconda installation, Numpy and Scipy are already installed, if not:



      conda install numpy scipy





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        You have Anaconda Python and not system Python version. Because you use Anaconda, your package should be installed using conda or Anaconda pip version. Using base environment of the default Anaconda installation, Numpy and Scipy are already installed, if not:



        conda install numpy scipy





        share|improve this answer












        You have Anaconda Python and not system Python version. Because you use Anaconda, your package should be installed using conda or Anaconda pip version. Using base environment of the default Anaconda installation, Numpy and Scipy are already installed, if not:



        conda install numpy scipy






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        cosmoscalibur

        552516




        552516






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036565%2fpython-numpy-or-scipy-error%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491