程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

《Python编程从入门到实践》建立虚拟环境conflicts with the name of an existing Python module and cannot be used as a p

发布于2019-08-22 19:51     阅读(4374)     评论(0)     点赞(30)     收藏(2)


《Python编程从入门到实践》第18章:建立虚拟环境

我安装书上的操作了一遍,出现了下列情况

 在执行 django-admin.py startproject learning_log . 时出现了CommandError: 'learning_log' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.的错误提示。

我百度之后并没有找到相同的错误和相应的解决方案。

百度翻译:commanderror:'learning_log'与现有python模块的名称冲突,不能用作项目名称。请尝试其他名称。 

我就看看这个模块到底在哪里。

 None是指不存在的意思吧?????

在网上找了查看模块的方法,并没有找到名为learning_log.py的模块。

 

暑假回到家,我再次搜索,发现了Anaconda3。

随后便是一番操作,发现可行。

 

18.2.3 Django管理网站

    按书上操作一番之后,网页并没有达到书上那样的结果,然后我运行了一下admin.py出现提示ModuleNotFoundError: No module named 'django'。

    百度之后可能是因为django版本不行。我升级一下版本。pip install --upgrade Django==2.1

    然后出现了:

django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

 


 



所属网站分类: 技术文章 > 博客

作者:老板跑路了

链接:https://www.pythonheidong.com/blog/article/53540/9c8bae59a5f1a6787c49/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

30 0
收藏该文
已收藏

评论内容:(最多支持255个字符)