首页 > 解决方案 > 如何在 djangocms 上启动项目?

问题描述

我正在尝试启动一个 djangocms 项目,但我不断收到以下错误:


(Pucho) PS C:\Users\Frazier\Desktop\Pucho> djangocms mysite
Creating the project
Please wait while I install dependencies
If I am stuck for a long time, please check for connectivity / PyPi issues
Dependencies installed
Creating the project
The installation has failed.


*****************************************************************

Check documentation at https://djangocms-installer.readthedocs.io

*****************************************************************

Traceback (most recent call last):
  File "c:\users\frazier\desktop\pucho\lib\site-packages\djangocms_installer\django\__init__.py", line 59, in create_project
    output = subprocess.check_output(cmd_args, stderr=subprocess.STDOUT)
  File "c:\users\frazier\appdata\local\programs\python\python38\Lib\subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "c:\users\frazier\appdata\local\programs\python\python38\Lib\subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['c:\\users\\frazier\\desktop\\pucho\\scripts\\python.exe', 'c:\\users\\frazier\\desktop\\pucho\\scripts\\django-admin.py', 'startproject', 'mysite', 'C:\\Users\\Frazier\\Desktop\\Pucho\\mysite']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\frazier\appdata\local\programs\python\python38\Lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\frazier\appdata\local\programs\python\python38\Lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Frazier\Desktop\Pucho\Scripts\djangocms.exe\__main__.py", line 7, in <module>
  File "c:\users\frazier\desktop\pucho\lib\site-packages\djangocms_installer\main.py", line 40, in execute
    django.create_project(config_data)
  File "c:\users\frazier\desktop\pucho\lib\site-packages\djangocms_installer\django\__init__.py", line 62, in create_project
    raise RuntimeError(e.output.decode('utf-8'))
RuntimeError: CommandError: 'mysite' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.

(Pucho) PS C:\Users\Frazier\Desktop\Pucho>

我试图卸载并重新安装 djangocms,但我不断收到相同的错误消息。帮我解决这个问题。

标签: pythondjangodjango-cms

解决方案


推荐阅读