Anaconda2 ImportError: No module named matplotlib.pylab
In Eclipse, I tried import "matplotlib", but it didn't work.
Traceback (most recent call last):
File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py",
line 2, in <module>
import matplotlib.pylab as plt
ImportError: No module named matplotlib.pylab
mycode is below
import numpy as np
import matplotlib.pylab as plt
def step_funtion(x):
return np.array(x>0,dtype=np.int)
x=np.arange(-5.0,5.0,0.1)
y=step_funtion(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show
※I checked by Windows cmd "WHERE", and finally I gets result of exsist of matplotlib's file.↓
>WHERE /r C:ProgramDataAnaconda2 matplotlib.* _
C:ProgramDataAnaconda2pkgsanaconda-navigator-1.9.2-py27_0Libsite-
packagesanaconda_navigatorstaticimageslogosmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.pdf
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.ppm
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.svg
C:ProgramDataAnaconda2pkgsspyder-3.3.1-py27_1Libsite-
packagesspyderimagesmatplotlib.png
python eclipse python-2.7 matplotlib importerror
|
show 2 more comments
In Eclipse, I tried import "matplotlib", but it didn't work.
Traceback (most recent call last):
File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py",
line 2, in <module>
import matplotlib.pylab as plt
ImportError: No module named matplotlib.pylab
mycode is below
import numpy as np
import matplotlib.pylab as plt
def step_funtion(x):
return np.array(x>0,dtype=np.int)
x=np.arange(-5.0,5.0,0.1)
y=step_funtion(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show
※I checked by Windows cmd "WHERE", and finally I gets result of exsist of matplotlib's file.↓
>WHERE /r C:ProgramDataAnaconda2 matplotlib.* _
C:ProgramDataAnaconda2pkgsanaconda-navigator-1.9.2-py27_0Libsite-
packagesanaconda_navigatorstaticimageslogosmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.pdf
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.ppm
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.svg
C:ProgramDataAnaconda2pkgsspyder-3.3.1-py27_1Libsite-
packagesspyderimagesmatplotlib.png
python eclipse python-2.7 matplotlib importerror
1
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
2
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
1
@helpful Can you check if you can import matplotlib alone,import matplotlib
? If so, what doesprint(matplotlib.__version__)
give? If not, you need to install matplotlib
– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49
|
show 2 more comments
In Eclipse, I tried import "matplotlib", but it didn't work.
Traceback (most recent call last):
File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py",
line 2, in <module>
import matplotlib.pylab as plt
ImportError: No module named matplotlib.pylab
mycode is below
import numpy as np
import matplotlib.pylab as plt
def step_funtion(x):
return np.array(x>0,dtype=np.int)
x=np.arange(-5.0,5.0,0.1)
y=step_funtion(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show
※I checked by Windows cmd "WHERE", and finally I gets result of exsist of matplotlib's file.↓
>WHERE /r C:ProgramDataAnaconda2 matplotlib.* _
C:ProgramDataAnaconda2pkgsanaconda-navigator-1.9.2-py27_0Libsite-
packagesanaconda_navigatorstaticimageslogosmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.pdf
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.ppm
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.svg
C:ProgramDataAnaconda2pkgsspyder-3.3.1-py27_1Libsite-
packagesspyderimagesmatplotlib.png
python eclipse python-2.7 matplotlib importerror
In Eclipse, I tried import "matplotlib", but it didn't work.
Traceback (most recent call last):
File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py",
line 2, in <module>
import matplotlib.pylab as plt
ImportError: No module named matplotlib.pylab
mycode is below
import numpy as np
import matplotlib.pylab as plt
def step_funtion(x):
return np.array(x>0,dtype=np.int)
x=np.arange(-5.0,5.0,0.1)
y=step_funtion(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show
※I checked by Windows cmd "WHERE", and finally I gets result of exsist of matplotlib's file.↓
>WHERE /r C:ProgramDataAnaconda2 matplotlib.* _
C:ProgramDataAnaconda2pkgsanaconda-navigator-1.9.2-py27_0Libsite-
packagesanaconda_navigatorstaticimageslogosmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.pdf
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.png
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.ppm
C:ProgramDataAnaconda2pkgsmatplotlib-2.2.3-py27h263d877_0Libsite-
packagesmatplotlibmpl-dataimagesmatplotlib.svg
C:ProgramDataAnaconda2pkgsspyder-3.3.1-py27_1Libsite-
packagesspyderimagesmatplotlib.png
python eclipse python-2.7 matplotlib importerror
python eclipse python-2.7 matplotlib importerror
edited Nov 21 '18 at 14:59
asked Nov 21 '18 at 12:48
Helpful
66
66
1
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
2
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
1
@helpful Can you check if you can import matplotlib alone,import matplotlib
? If so, what doesprint(matplotlib.__version__)
give? If not, you need to install matplotlib
– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49
|
show 2 more comments
1
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
2
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
1
@helpful Can you check if you can import matplotlib alone,import matplotlib
? If so, what doesprint(matplotlib.__version__)
give? If not, you need to install matplotlib
– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49
1
1
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
2
2
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
1
1
@helpful Can you check if you can import matplotlib alone,
import matplotlib
? If so, what does print(matplotlib.__version__)
give? If not, you need to install matplotlib– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@helpful Can you check if you can import matplotlib alone,
import matplotlib
? If so, what does print(matplotlib.__version__)
give? If not, you need to install matplotlib– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49
|
show 2 more comments
1 Answer
1
active
oldest
votes
I think you meant:
import matplotlib.pyplot as plt
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked ifmatplotlib
is installed?
– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f53412390%2fanaconda2-importerror-no-module-named-matplotlib-pylab%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you meant:
import matplotlib.pyplot as plt
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked ifmatplotlib
is installed?
– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
|
show 2 more comments
I think you meant:
import matplotlib.pyplot as plt
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked ifmatplotlib
is installed?
– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
|
show 2 more comments
I think you meant:
import matplotlib.pyplot as plt
I think you meant:
import matplotlib.pyplot as plt
answered Nov 21 '18 at 12:55
Joe
5,84421129
5,84421129
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked ifmatplotlib
is installed?
– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
|
show 2 more comments
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked ifmatplotlib
is installed?
– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
thx answer, but it also doesn't work^^;; Traceback (most recent call last): File "C:UsersHunter-DesktopA_Cognitiveneural_networkstep_function.py", line 2, in <module> import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot
– Helpful
Nov 21 '18 at 13:19
have you checked if
matplotlib
is installed?– Joe
Nov 21 '18 at 13:22
have you checked if
matplotlib
is installed?– Joe
Nov 21 '18 at 13:22
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
Thx 4 ur repling. Now I'm tring it but Idk how to check its exist. Is this way wrong?→import os.path print(os.path.isfile("matplotlib")) This result was false.
– Helpful
Nov 21 '18 at 13:37
try with:
import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
try with:
import sys
print 'matplotlib' in sys.modules
– Joe
Nov 21 '18 at 13:41
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑
– Helpful
Nov 21 '18 at 14:38
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2fstackoverflow.com%2fquestions%2f53412390%2fanaconda2-importerror-no-module-named-matplotlib-pylab%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
1
pylab is generally discouraged. It wouldn't surprise me if they simply removed it in the meantime.
– roganjosh
Nov 21 '18 at 12:55
2
@roganjosh No pylab still exists. It wasn't removed. It's discouraged, but many people like it, so it stays.
– ImportanceOfBeingErnest
Nov 21 '18 at 12:58
1
@helpful Can you check if you can import matplotlib alone,
import matplotlib
? If so, what doesprint(matplotlib.__version__)
give? If not, you need to install matplotlib– ImportanceOfBeingErnest
Nov 21 '18 at 13:08
@ImportanceOfBeingErnest Thx 4 ur kindness. Idk how to check whether it is or not. Is this way wrong?→ import os.path print(os.path.isfile("matplotlib")) The result was false.
– Helpful
Nov 21 '18 at 13:34
@ImportanceOfBeingErnest Finally I checked by Windows cmd and then the file probably nothing. The result is written on my question on Top in this page↑ What should I next?
– Helpful
Nov 21 '18 at 14:49