Numpy installed only for python3.5, not for python3.6

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








up vote
1
down vote

favorite












I have both python3.5 and python3.6 in my computer. When I try to import python in numpy3.6, I get an error. When I try to install numpy through sudo pip3 install numpy, I get the message Requirement already satisfied: numpy in /home/user/.local/lib/python3.5/site-packages. How do I install numpy for python 3.6?



That's the exception I get when importing numpy:



Python 3.6.3 (default, Oct 6 2017, 08:44:35) [GCC 6.3.0 20170406] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy'
>>>


Thanks







share|improve this question






















  • Related: askubuntu.com/q/1035826/250300
    – Melebius
    May 15 at 6:26















up vote
1
down vote

favorite












I have both python3.5 and python3.6 in my computer. When I try to import python in numpy3.6, I get an error. When I try to install numpy through sudo pip3 install numpy, I get the message Requirement already satisfied: numpy in /home/user/.local/lib/python3.5/site-packages. How do I install numpy for python 3.6?



That's the exception I get when importing numpy:



Python 3.6.3 (default, Oct 6 2017, 08:44:35) [GCC 6.3.0 20170406] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy'
>>>


Thanks







share|improve this question






















  • Related: askubuntu.com/q/1035826/250300
    – Melebius
    May 15 at 6:26













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have both python3.5 and python3.6 in my computer. When I try to import python in numpy3.6, I get an error. When I try to install numpy through sudo pip3 install numpy, I get the message Requirement already satisfied: numpy in /home/user/.local/lib/python3.5/site-packages. How do I install numpy for python 3.6?



That's the exception I get when importing numpy:



Python 3.6.3 (default, Oct 6 2017, 08:44:35) [GCC 6.3.0 20170406] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy'
>>>


Thanks







share|improve this question














I have both python3.5 and python3.6 in my computer. When I try to import python in numpy3.6, I get an error. When I try to install numpy through sudo pip3 install numpy, I get the message Requirement already satisfied: numpy in /home/user/.local/lib/python3.5/site-packages. How do I install numpy for python 3.6?



That's the exception I get when importing numpy:



Python 3.6.3 (default, Oct 6 2017, 08:44:35) [GCC 6.3.0 20170406] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy'
>>>


Thanks









share|improve this question













share|improve this question




share|improve this question








edited May 15 at 6:19

























asked May 14 at 21:13









user1767774

1106




1106











  • Related: askubuntu.com/q/1035826/250300
    – Melebius
    May 15 at 6:26

















  • Related: askubuntu.com/q/1035826/250300
    – Melebius
    May 15 at 6:26
















Related: askubuntu.com/q/1035826/250300
– Melebius
May 15 at 6:26





Related: askubuntu.com/q/1035826/250300
– Melebius
May 15 at 6:26











1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










make sure pip is installed with:



wget https://bootstrap.pypa.io/get-pip.py


and:



sudo python3.6 get-pip.py


and then you can install numpy with:



sudo python3.6 -m pip install numpy





share|improve this answer






















  • I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
    – user1767774
    May 15 at 6:15







  • 1




    solved after adding --upgrade to that command. Thanks!
    – user1767774
    May 15 at 6:33










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%2f1036277%2fnumpy-installed-only-for-python3-5-not-for-python3-6%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
1
down vote



accepted










make sure pip is installed with:



wget https://bootstrap.pypa.io/get-pip.py


and:



sudo python3.6 get-pip.py


and then you can install numpy with:



sudo python3.6 -m pip install numpy





share|improve this answer






















  • I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
    – user1767774
    May 15 at 6:15







  • 1




    solved after adding --upgrade to that command. Thanks!
    – user1767774
    May 15 at 6:33














up vote
1
down vote



accepted










make sure pip is installed with:



wget https://bootstrap.pypa.io/get-pip.py


and:



sudo python3.6 get-pip.py


and then you can install numpy with:



sudo python3.6 -m pip install numpy





share|improve this answer






















  • I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
    – user1767774
    May 15 at 6:15







  • 1




    solved after adding --upgrade to that command. Thanks!
    – user1767774
    May 15 at 6:33












up vote
1
down vote



accepted







up vote
1
down vote



accepted






make sure pip is installed with:



wget https://bootstrap.pypa.io/get-pip.py


and:



sudo python3.6 get-pip.py


and then you can install numpy with:



sudo python3.6 -m pip install numpy





share|improve this answer














make sure pip is installed with:



wget https://bootstrap.pypa.io/get-pip.py


and:



sudo python3.6 get-pip.py


and then you can install numpy with:



sudo python3.6 -m pip install numpy






share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 13 at 3:32

























answered May 15 at 1:24









jackw11111

33317




33317











  • I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
    – user1767774
    May 15 at 6:15







  • 1




    solved after adding --upgrade to that command. Thanks!
    – user1767774
    May 15 at 6:33
















  • I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
    – user1767774
    May 15 at 6:15







  • 1




    solved after adding --upgrade to that command. Thanks!
    – user1767774
    May 15 at 6:33















I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
– user1767774
May 15 at 6:15





I have followed your answer, but when writing "python3.6 -m pip install numpy" I get the output: Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.12.1). I added to the question the full exception I get when importing numpy in python3.6.
– user1767774
May 15 at 6:15





1




1




solved after adding --upgrade to that command. Thanks!
– user1767774
May 15 at 6:33




solved after adding --upgrade to that command. Thanks!
– user1767774
May 15 at 6:33












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036277%2fnumpy-installed-only-for-python3-5-not-for-python3-6%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

Running the scala interactive shell from the command line

Do not install recommended packages of dependencies