How to solve ModuleNotFound Error: in IDLE?












0














I am using ubuntu 18.04. I first installed Python along with anacondafrom terminal whose version is 3.7.0 and I have launched Jupyter notebook and Spyder as well. Then I installed IDLE whose version is 3.6.6+ and I am currently working in IDLE but then when I tried to import module,it shows the error: No module found. I checked for the path as well for both in IDLE and Terminal which are different.How do I solve this problem?



when I checked the python path,



In terminal,



/home/reema/anaconda3/lib/python37.zip:/home/reema/anaconda3/lib/python3.7:/home/reema/anaconda3/lib/python3.7/lib-dynload:/home/reema/anaconda3/lib/python3.7/site-packages


In IDLE,



['', '/home/reema', '/usr/bin', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


I tried appending in IDLE but it doesn't work.










share|improve this question
























  • You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
    – gboffi
    Nov 12 at 9:20










  • If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
    – gboffi
    Nov 12 at 9:27










  • I have just edited my question. Hope that makes my problem clear.
    – Rima
    Nov 12 at 9:30










  • Possible duplicate of Import Python Module Works in Terminal but not in IDLE
    – Ayush Gupta
    Nov 12 at 9:31
















0














I am using ubuntu 18.04. I first installed Python along with anacondafrom terminal whose version is 3.7.0 and I have launched Jupyter notebook and Spyder as well. Then I installed IDLE whose version is 3.6.6+ and I am currently working in IDLE but then when I tried to import module,it shows the error: No module found. I checked for the path as well for both in IDLE and Terminal which are different.How do I solve this problem?



when I checked the python path,



In terminal,



/home/reema/anaconda3/lib/python37.zip:/home/reema/anaconda3/lib/python3.7:/home/reema/anaconda3/lib/python3.7/lib-dynload:/home/reema/anaconda3/lib/python3.7/site-packages


In IDLE,



['', '/home/reema', '/usr/bin', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


I tried appending in IDLE but it doesn't work.










share|improve this question
























  • You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
    – gboffi
    Nov 12 at 9:20










  • If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
    – gboffi
    Nov 12 at 9:27










  • I have just edited my question. Hope that makes my problem clear.
    – Rima
    Nov 12 at 9:30










  • Possible duplicate of Import Python Module Works in Terminal but not in IDLE
    – Ayush Gupta
    Nov 12 at 9:31














0












0








0







I am using ubuntu 18.04. I first installed Python along with anacondafrom terminal whose version is 3.7.0 and I have launched Jupyter notebook and Spyder as well. Then I installed IDLE whose version is 3.6.6+ and I am currently working in IDLE but then when I tried to import module,it shows the error: No module found. I checked for the path as well for both in IDLE and Terminal which are different.How do I solve this problem?



when I checked the python path,



In terminal,



/home/reema/anaconda3/lib/python37.zip:/home/reema/anaconda3/lib/python3.7:/home/reema/anaconda3/lib/python3.7/lib-dynload:/home/reema/anaconda3/lib/python3.7/site-packages


In IDLE,



['', '/home/reema', '/usr/bin', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


I tried appending in IDLE but it doesn't work.










share|improve this question















I am using ubuntu 18.04. I first installed Python along with anacondafrom terminal whose version is 3.7.0 and I have launched Jupyter notebook and Spyder as well. Then I installed IDLE whose version is 3.6.6+ and I am currently working in IDLE but then when I tried to import module,it shows the error: No module found. I checked for the path as well for both in IDLE and Terminal which are different.How do I solve this problem?



when I checked the python path,



In terminal,



/home/reema/anaconda3/lib/python37.zip:/home/reema/anaconda3/lib/python3.7:/home/reema/anaconda3/lib/python3.7/lib-dynload:/home/reema/anaconda3/lib/python3.7/site-packages


In IDLE,



['', '/home/reema', '/usr/bin', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


I tried appending in IDLE but it doesn't work.







python-3.x python-idle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 9:28

























asked Nov 12 at 8:58









Rima

75




75












  • You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
    – gboffi
    Nov 12 at 9:20










  • If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
    – gboffi
    Nov 12 at 9:27










  • I have just edited my question. Hope that makes my problem clear.
    – Rima
    Nov 12 at 9:30










  • Possible duplicate of Import Python Module Works in Terminal but not in IDLE
    – Ayush Gupta
    Nov 12 at 9:31


















  • You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
    – gboffi
    Nov 12 at 9:20










  • If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
    – gboffi
    Nov 12 at 9:27










  • I have just edited my question. Hope that makes my problem clear.
    – Rima
    Nov 12 at 9:30










  • Possible duplicate of Import Python Module Works in Terminal but not in IDLE
    – Ayush Gupta
    Nov 12 at 9:31
















You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
– gboffi
Nov 12 at 9:20




You should tell ① which OS, distribution you use, ② how you installed Python 3.6 and Idle, ③ how you installed Pyton 3.7 and ④ execute import sys ; print(sys.path) in both Pythons and report the results.
– gboffi
Nov 12 at 9:20












If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
– gboffi
Nov 12 at 9:27




If you want a shoot in the dark, an opinionated shoot in the dark, you simply have installed some modules using 3.6 and the others using 3.7. sys.path tipically references the Python version in the path names it contains.
– gboffi
Nov 12 at 9:27












I have just edited my question. Hope that makes my problem clear.
– Rima
Nov 12 at 9:30




I have just edited my question. Hope that makes my problem clear.
– Rima
Nov 12 at 9:30












Possible duplicate of Import Python Module Works in Terminal but not in IDLE
– Ayush Gupta
Nov 12 at 9:31




Possible duplicate of Import Python Module Works in Terminal but not in IDLE
– Ayush Gupta
Nov 12 at 9:31












1 Answer
1






active

oldest

votes


















0














Your problem is due to the different interpreters installing modules in different paths, and because the default interpreter at the command prompt is likely 3.7, while the installed Idle uses 3.6



The answer to your problem is to use pip to install new modules and invoke pip as follows



$ python3.x -m pip install ...


This way you know which interpreter is called, and each times the correct version of pip is invoked and, each time, the module is installed in the correct path for a given interpreter.



I have to add that, as far as I can tell, the Anaconda distribution does not support Idle.






share|improve this answer























  • so after installing pip, should I re-install my IDLE?
    – Rima
    Nov 12 at 9:54










  • since I already have installed anaconda package and i cannot install module manually after then,what should I do?
    – Rima
    Nov 12 at 10:01










  • I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
    – Rima
    Nov 12 at 10:19










  • Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
    – gboffi
    Nov 12 at 10:23






  • 1




    Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
    – Terry Jan Reedy
    Nov 12 at 19:38











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258737%2fhow-to-solve-modulenotfound-error-in-idle%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









0














Your problem is due to the different interpreters installing modules in different paths, and because the default interpreter at the command prompt is likely 3.7, while the installed Idle uses 3.6



The answer to your problem is to use pip to install new modules and invoke pip as follows



$ python3.x -m pip install ...


This way you know which interpreter is called, and each times the correct version of pip is invoked and, each time, the module is installed in the correct path for a given interpreter.



I have to add that, as far as I can tell, the Anaconda distribution does not support Idle.






share|improve this answer























  • so after installing pip, should I re-install my IDLE?
    – Rima
    Nov 12 at 9:54










  • since I already have installed anaconda package and i cannot install module manually after then,what should I do?
    – Rima
    Nov 12 at 10:01










  • I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
    – Rima
    Nov 12 at 10:19










  • Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
    – gboffi
    Nov 12 at 10:23






  • 1




    Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
    – Terry Jan Reedy
    Nov 12 at 19:38
















0














Your problem is due to the different interpreters installing modules in different paths, and because the default interpreter at the command prompt is likely 3.7, while the installed Idle uses 3.6



The answer to your problem is to use pip to install new modules and invoke pip as follows



$ python3.x -m pip install ...


This way you know which interpreter is called, and each times the correct version of pip is invoked and, each time, the module is installed in the correct path for a given interpreter.



I have to add that, as far as I can tell, the Anaconda distribution does not support Idle.






share|improve this answer























  • so after installing pip, should I re-install my IDLE?
    – Rima
    Nov 12 at 9:54










  • since I already have installed anaconda package and i cannot install module manually after then,what should I do?
    – Rima
    Nov 12 at 10:01










  • I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
    – Rima
    Nov 12 at 10:19










  • Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
    – gboffi
    Nov 12 at 10:23






  • 1




    Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
    – Terry Jan Reedy
    Nov 12 at 19:38














0












0








0






Your problem is due to the different interpreters installing modules in different paths, and because the default interpreter at the command prompt is likely 3.7, while the installed Idle uses 3.6



The answer to your problem is to use pip to install new modules and invoke pip as follows



$ python3.x -m pip install ...


This way you know which interpreter is called, and each times the correct version of pip is invoked and, each time, the module is installed in the correct path for a given interpreter.



I have to add that, as far as I can tell, the Anaconda distribution does not support Idle.






share|improve this answer














Your problem is due to the different interpreters installing modules in different paths, and because the default interpreter at the command prompt is likely 3.7, while the installed Idle uses 3.6



The answer to your problem is to use pip to install new modules and invoke pip as follows



$ python3.x -m pip install ...


This way you know which interpreter is called, and each times the correct version of pip is invoked and, each time, the module is installed in the correct path for a given interpreter.



I have to add that, as far as I can tell, the Anaconda distribution does not support Idle.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 12 at 9:57

























answered Nov 12 at 9:52









gboffi

8,83822454




8,83822454












  • so after installing pip, should I re-install my IDLE?
    – Rima
    Nov 12 at 9:54










  • since I already have installed anaconda package and i cannot install module manually after then,what should I do?
    – Rima
    Nov 12 at 10:01










  • I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
    – Rima
    Nov 12 at 10:19










  • Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
    – gboffi
    Nov 12 at 10:23






  • 1




    Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
    – Terry Jan Reedy
    Nov 12 at 19:38


















  • so after installing pip, should I re-install my IDLE?
    – Rima
    Nov 12 at 9:54










  • since I already have installed anaconda package and i cannot install module manually after then,what should I do?
    – Rima
    Nov 12 at 10:01










  • I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
    – Rima
    Nov 12 at 10:19










  • Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
    – gboffi
    Nov 12 at 10:23






  • 1




    Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
    – Terry Jan Reedy
    Nov 12 at 19:38
















so after installing pip, should I re-install my IDLE?
– Rima
Nov 12 at 9:54




so after installing pip, should I re-install my IDLE?
– Rima
Nov 12 at 9:54












since I already have installed anaconda package and i cannot install module manually after then,what should I do?
– Rima
Nov 12 at 10:01




since I already have installed anaconda package and i cannot install module manually after then,what should I do?
– Rima
Nov 12 at 10:01












I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
– Rima
Nov 12 at 10:19




I checked the pip version and it says 'pip 18.1 from /home/reema/anaconda3/lib/python3.7/site-packages/pip (python 3.7)' when I tried installing module for python3.6,it says 'no module named pip' i don't understand the problem. I am a complete newbie and I am having problem understanding it.
– Rima
Nov 12 at 10:19












Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
– gboffi
Nov 12 at 10:23




Please pretty please — read my answer. Invoke pip using the syntax I've shown ensures that the module is installed for a specific version. If you do not install for 3.6, it's not available in Idle. That's all. Trust me.
– gboffi
Nov 12 at 10:23




1




1




Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
– Terry Jan Reedy
Nov 12 at 19:38




Try python3.6 -m ensurepip (or just python in the 3.6 directory) to install pip to python 3.6. See docs.python.org/3.6/library/ensurepip.html#module-ensurepip
– Terry Jan Reedy
Nov 12 at 19:38


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258737%2fhow-to-solve-modulenotfound-error-in-idle%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues