>>> import django
>>> django.VERSION
(1, 11, 0, 'final', 1)
您能对此发表评论:
(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.
这是一个新开始的项目:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
我一直使用名为“home”的应用程序。现在它开始冲突了。我已经在另一个项目中使用过Django 1.11。家庭应用程序的创建并没有造成任何错误信息。
你能评论一下:它与冲突有什么关系?
稍后添加:
树
(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冻结
(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
答案 0 :(得分:0)
尝试转到python安装目录,然后转到NSLayoutConstraint.activate([
customView.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor, constant: 0)
])
目录(例如Lib\site-packages
)。
搜索文件夹c:\Program Files\Python36\Lib\site-packages\
和home
(例如home-something
)并尝试删除它们。这对我有帮助。