【问题标题】:Unable to run Python Django Oscar sandbox website on Windows无法在 Windows 上运行 Python Django Oscar 沙盒网站
【发布时间】:2019-10-02 10:01:24
【问题描述】:

我想学习如何使用 Django 和 Oscar 创建电子商务网站。我最初尝试遵循一些教程,但几乎所有教程都使用一些旧版本。

最后,我尝试按照官方文档进行操作。唯一的问题是网站上的说明似乎是针对 Linux 的。 (https://django-oscar.readthedocs.io/en/2.0.2/internals/sandbox.html)。

这是我在终端中编写的命令:

git clone https://github.com/django-oscar/django-oscar.git
cd django-oscar
virtualenv oscar
oscar\Scripts\Activate

这些命令似乎已经创建了所有文件夹。不过,

make sandbox
sandbox/manage.py runserver

抛出关于 make 未被识别的错误。我在我的 Windows 上安装了 MinGW,但这似乎没有任何区别。

如果我尝试直接运行manage.py runserver 命令。

cd sandbox
manage.py runserver

我收到以下错误:

ModuleNotFoundError: No module named 'django'

如何让示例 Django Oscar 项目运行?

谢谢。

【问题讨论】:

  • 这意味着 virtualenv 可能没有安装 django,只需使用pip install django-oscar 它将安装 Django 和 Django-oscar

标签: python django django-oscar


【解决方案1】:

只需使用命令从 django-oscar 文件夹中安装 requirements.txt

pip install requirements.txt

【讨论】:

  • 感谢@amolpachpute,但它给了我以下错误:ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none)
猜你喜欢
  • 1970-01-01
  • 2012-10-25
  • 2022-11-17
  • 2016-02-22
  • 1970-01-01
  • 1970-01-01
  • 2022-08-18
  • 2016-07-31
  • 2012-03-29
相关资源
最近更新 更多