Startapp command Module Not Found

Module not found.

I am trying to continue my project on django for beginners. In the instructions it tells me to run the startapp command. Python manage.py startapp pages. But when I run the command it says No Module Named pages. I would certainly believe that is the case, I am trying to tell it to create it. Is there a way around this error?

andrewstribling@Andrews-MBP news % python manage.py startapp pages
Traceback (most recent call last):
  File "/Users/andrewstribling/Desktop/code/news/manage.py", line 22, in <module>
    main()
  File "/Users/andrewstribling/Desktop/code/news/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/andrewstribling/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/Users/andrewstribling/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/Users/andrewstribling/Library/Python/3.9/lib/python/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/andrewstribling/Library/Python/3.9/lib/python/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/Users/andrewstribling/Library/Python/3.9/lib/python/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pages'
andrewstribling@Andrews-MBP news % 

Do you already have “pages” in your INSTALLED_APPS setting? If so, it needs to be removed until the app is created.

If you don’t, then we’ll need to see your settings file to see what might be causing this.

Now I understand. Thank you Ken!

Also I was listening to you on Django Chat! I had no idea you were so accomplished! :slight_smile:

Thank you so much for your help!