No module named 'numpy'
Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using
sudo apt-get install python3-numpy
sudo apt-get install matplotlib3-numpy
But still when I try to run the script I get error:
from python3-numpy import *
^
SyntaxError: invalid syntax
or:
from numpy import *
ImportError: No module named 'numpy'
python3 numpy matplotlib
add a comment |
Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using
sudo apt-get install python3-numpy
sudo apt-get install matplotlib3-numpy
But still when I try to run the script I get error:
from python3-numpy import *
^
SyntaxError: invalid syntax
or:
from numpy import *
ImportError: No module named 'numpy'
python3 numpy matplotlib
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
2
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42
add a comment |
Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using
sudo apt-get install python3-numpy
sudo apt-get install matplotlib3-numpy
But still when I try to run the script I get error:
from python3-numpy import *
^
SyntaxError: invalid syntax
or:
from numpy import *
ImportError: No module named 'numpy'
python3 numpy matplotlib
Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using
sudo apt-get install python3-numpy
sudo apt-get install matplotlib3-numpy
But still when I try to run the script I get error:
from python3-numpy import *
^
SyntaxError: invalid syntax
or:
from numpy import *
ImportError: No module named 'numpy'
python3 numpy matplotlib
python3 numpy matplotlib
edited Aug 31 '16 at 11:00
Kevin Bowen
14.7k155970
14.7k155970
asked Mar 22 '16 at 11:15
rjbirrjbir
33113
33113
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
2
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42
add a comment |
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
2
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
2
2
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42
add a comment |
3 Answers
3
active
oldest
votes
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
add a comment |
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version
add a comment |
If the other answer didn't work for you, try:
sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy
If that doesn't work, then you have other issues.
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f748929%2fno-module-named-numpy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
add a comment |
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
add a comment |
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
You need to install numpy using pip
install pip :
sudo apt-get install python-pip python3-pip
Then install numpy using pip
sudo pip3 install -U numpy
edited Mar 22 '16 at 17:39
mchid
23.4k25286
23.4k25286
answered Mar 22 '16 at 11:42
Nadimul De CjNadimul De Cj
20415
20415
add a comment |
add a comment |
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version
add a comment |
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version
add a comment |
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version
Are you sure that you run python3 and not just python, which defaults to python2.7 on most systems.
You can get the Version of python with
python --version
or
python3 --version
answered Mar 22 '16 at 20:28
Jim KnopfJim Knopf
412
412
add a comment |
add a comment |
If the other answer didn't work for you, try:
sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy
If that doesn't work, then you have other issues.
add a comment |
If the other answer didn't work for you, try:
sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy
If that doesn't work, then you have other issues.
add a comment |
If the other answer didn't work for you, try:
sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy
If that doesn't work, then you have other issues.
If the other answer didn't work for you, try:
sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy
If that doesn't work, then you have other issues.
edited Mar 22 '16 at 17:38
mchid
23.4k25286
23.4k25286
answered Mar 22 '16 at 17:29
catcat
9281338
9281338
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f748929%2fno-module-named-numpy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
do you try sudo apt-get install python-matplotlib before sudo apt-get install python3-numpy??
– Nadimul De Cj
Mar 22 '16 at 11:27
yes @NadimulDeCj, retyping it says - "python-matplotlib is already the newest version."
– rjbir
Mar 22 '16 at 11:29
2
Are you sure you don't use python to run the file with "from numpy import *"? Many computers link python to Python 2.7 and python3 to Python 3
– ArcaneDominion
Mar 22 '16 at 11:42