Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'home' conflicts with the name of an existing Python module

Tags:

django

>>> import django
>>> django.VERSION
(1, 11, 0, 'final', 1)

Could you comment on this:

(django11test) michael@ThinkPad:~/workspace/django11test$ python manage.py startapp home
CommandError: 'home' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.

It is a newly started project:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

I have always used applications called "home". And now it starts conflicting. I have already used Django 1.11 in another project. And the creation of home application didn't inflict any error messages.

Could you comment: with what does it conflict?

ADDED LATER:

Tree

(django11test) michael@ThinkPad:~/workspace/django11test$ tree
.
├── db.sqlite3
├── django11test
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-36.pyc
│   │   ├── settings.cpython-36.pyc
│   │   ├── urls.cpython-36.pyc
│   │   └── wsgi.cpython-36.pyc
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── manage.py

pip freeze

(django11test) michael@ThinkPad:~/workspace/django11test$ pip freeze
appdirs==1.4.3
Django==1.11
django-appconf==1.0.2
django-imagekit==4.0
olefile==0.44
packaging==16.8
pilkit==2.0
Pillow==4.1.1
pkg-resources==0.0.0
pyparsing==2.2.0
pytz==2017.2
six==1.10.0
like image 753
Michael Avatar asked Oct 31 '25 12:10

Michael


1 Answers

Try to go to your python installation directory and after, go to the Lib\site-packages directory (e.g. c:\Program Files\Python36\Lib\site-packages\).

Search for a folder home and home-something (e.g. "home-0.24-py3.6.egg-info") and try to delete them. This has helped me.

like image 59
johny Avatar answered Nov 03 '25 01:11

johny