简体   繁体   English

使用 Pip 安装/启动 Django 时出错

[英]Error Installing/Launching Django Using Pip

I have downloaded and pip installed Django, but I can't find an icon or the right link to launch the Django app.我已经下载并 pip 安装了 Django,但我找不到启动 Django 应用程序的图标或正确的链接。

When I search installed files using "Django" I get a zip file,当我使用“Django”搜索已安装的文件时,我得到一个 zip 文件,

This is the error I get:这是我得到的错误:

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'django'回溯(最近一次调用):文件“”,第 1 行,在 ModuleNotFoundError 中:没有名为“django”的模块

Plus when I attempt to unzip the Django file, WinRar asks me to purchase a license.另外,当我尝试解压缩 Django 文件时,WinRar 会要求我购买许可证。

So how do I launch the installed Python environment?那么如何启动已安装的 Python 环境呢?

I use WIN10, Python 3.6.2我使用 WIN10,Python 3.6.2

Thank you谢谢

There is no link or icon to launch the Django app unless you have the project open in an IDE like PyCharm or the like with the correct Python PATH, otherwise, you must run it from command-line.除非您在 PyCharm 等 IDE 中使用正确的 Python PATH 打开项目,否则没有启动 Django 应用程序的链接或图标,否则,您必须从命令行运行它。

I suggest you open up your terminal and enter pip --version , which should return your pip version (not an error).我建议您打开终端并输入pip --version ,它应该返回您的pip版本(不是错误)。 Then pip install Django just to make sure you have Django installed.然后pip install Django只是为了确保你已经安装了 Django。 Finally, navigate to your project in your terminal and run it with python manage.py runserver最后,在终端中导航到您的项目并使用python manage.py runserver运行它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM