<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Deepak</title>
    <description>The latest articles on DEV Community by Deepak (@deepakqc).</description>
    <link>https://dev.to/deepakqc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F605203%2F6bc22205-0a18-4199-aa44-05112ff78df7.jpg</url>
      <title>DEV Community: Deepak</title>
      <link>https://dev.to/deepakqc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deepakqc"/>
    <language>en</language>
    <item>
      <title>What does it mean by modulenotfounderror in python?</title>
      <dc:creator>Deepak</dc:creator>
      <pubDate>Tue, 09 Nov 2021 13:45:38 +0000</pubDate>
      <link>https://dev.to/deepakqc/what-does-it-mean-by-modulenotfounderror-in-python-4lbh</link>
      <guid>https://dev.to/deepakqc/what-does-it-mean-by-modulenotfounderror-in-python-4lbh</guid>
      <description>&lt;p&gt;Well, modulenotfounderror itself says module not found. Means something wrong while importing modules in python script. &lt;/p&gt;

&lt;p&gt;There can be multiple reason behind this problem&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Spelling mistake in imported module name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Imported package is not installed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Path for imported packages is not found by python interpreter&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Spelling mistake in imported module name
&lt;/h3&gt;

&lt;p&gt;Its most common issue while importing modules there can be human typing mistake. Therefore we need to first look for spelling in module name included.&lt;/p&gt;

&lt;h3&gt;
  
  
  Imported package is not installed
&lt;/h3&gt;

&lt;p&gt;some of the python package does not come with python installation and require to install externally using pip command.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;pip install requests&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Here pip command is used to install request package.&lt;/p&gt;

&lt;h3&gt;
  
  
  Path for imported packages is not found by python interpreter
&lt;/h3&gt;

&lt;p&gt;This is also common mistake we do specially beginners. We already have respected package installed or user defined package is in another folder on a particular server path but interpreter can't find while running python script. &lt;/p&gt;

&lt;p&gt;In such case we just need to let interpreter find path for imported packages. &lt;/p&gt;

&lt;p&gt;We can define path for package like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import sys
sys.path.append('path_to_misc') 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another way we can do to create empty file &lt;strong&gt;init&lt;/strong&gt;.py to make folder behave as a package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from folder import module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Therefore we can import module exist in folder.&lt;/p&gt;

&lt;p&gt;Hope it help to understand basic insight about modulenotfounderror. Please go through &lt;a href="https://www.quizcure.com/python/modulenotfounderror-no-module-named-exceptions#wrong-package-path"&gt;modulenotfounderror no module named exceptions&lt;/a&gt;  for more detail with demonstration example code.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
