title: Failing at importing modules on items.py file - Scrapy
body: <p>I'm new in Python and I'm currently learning webscraping with spiders. Following the tutorial, I stucked at relative importing with Python.</p>
  <p>This is the structure of my current folder (provided by <code>scrapy startproject p1</code>):</p>
  <p><a href="https://i.stack.imgur.com/LDuRE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LDuRE.png" alt="folder structure" /></a></p>
  <p>My <strong>items.py</strong> file:</p>
  <pre><code># Define here the models for your scraped items
  #
  # See documentation in:
  # https://docs.scrapy.org/en/latest/topics/items.html
  
  import scrapy
  
  
  class Test(scrapy.Item):
      # define the fields for your item here like:
      # name = scrapy.Field()
      title = scrapy.Field()
      price = scrapy.Field()
      pass
  </code></pre>
  <p>In my <strong>filetwo.py</strong>, it contains:</p>
  <pre><code>import scrapy
  from p1.items import Test
  </code></pre>
  <p>When I run the code, I get &quot;ModuleNotFoundError: No module named 'p1'&quot;</p>
  <p>I also read some people online that faced the same problem, so I tried <code>..items import Test</code> and still didn't work. It gave me the error: <code>ImportError: attempted relative import with no known parent package</code></p>
  <p>Can someone give me a light?</p>
  <p>Thanks in advance!</p>