pycharm中运行manage.py报错
来源:6-2 django目录结构解析-2
忽有狂徒夜磨刀
2022-10-11
为什么在pycharm - tools - run manage.py的时候会报错啊,python版本3.7.9 ,django版本2.2
具体报错如下
Failed to get real commands on module “message”: python process died with code 1: Traceback (most recent call last):
File “D:\study\pycharm\PyCharm 2022.2.2\plugins\python\helpers\pycharm_jb_manage_tasks_provider.py”, line 25, in
django.setup()
File “C:\Users\Michealson\Envs\mxonline\lib\site-packages\django_init_.py”, line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File “C:\Users\Michealson\Envs\mxonline\lib\site-packages\django\conf_init_.py”, line 79, in getattr
self.setup(name)
File "C:\Users\Michealson\Envs\mxonline\lib\site-packages\django\conf_init.py", line 66, in setup
self.wrapped = Settings(settings_module)
File "C:\Users\Michealson\Envs\mxonline\lib\site-packages\django\conf_init.py", line 157, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "c:\users\michealson\appdata\local\programs\python\python37\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “
人都麻了,又是百度又是把视频反复看搞了快4个小时了,没有解决,现来求助
如有必要请老师加我qq 761036439
1回答
-
忽有狂徒夜磨刀
提问者
2022-10-11
啊,困扰我多时的问题终于得到解决,我猜测是因为win11在pip install django的时候有问题,目前使用pycharm自己下载的django3.5.2后运行正常。
观察到一个情况,pip install django 2.2的时候使用pip list没有asgiref这个东西,安装django3.2后这个东西有了
asgiref 3.5.2
Django 3.2.16
112023-02-27
相似问题