如何安装Python / Django模块? [英] How do I install Python/Django Modules?

查看:104
本文介绍了如何安装Python / Django模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全不知道Django,但是我需要在OSX中运行一个现有的项目。



从项目目录我运行 python manage.py runserver 并得到错误:错误:没有名为cms的模块



看起来像INSTALLED_APPS常数(在settings.py中)定义所需的模块...但是如何安装dang的东西?



有没有一种批量安装依赖关系的标准方法(如Ruby的Bundler)?

解决方案

你可以一次安装所有依赖项,如果有一个require.txt文件!你只需要运行以下命令:

  pip install -r requirements.txt 

否则您可以逐个安装:

  pip install django-cms 

这是PIP文档:
http://pypi.python.org/pypi/pip



如果你习惯了ruby,你可以比较ruby GEM


I know absolutely nothing about Django, but I am needing to get an existing project running in OSX.

From the project's directory I run python manage.py runserver and get the error: Error: No module named cms.

Seems like the INSTALLED_APPS constant (in settings.py) defines the required modules... but how do I install the dang things?

Is there a standard way of installing dependencies in bulk (like Ruby's Bundler)?

解决方案

you can install all dependencies in once, if there is a requirements.txt file! you just have to run the follow command:

pip install -r requirements.txt

otherwise you can install one by one:

pip install django-cms

Here is the PIP documentation: http://pypi.python.org/pypi/pip

if you are used to ruby, you can compared to ruby GEM

这篇关于如何安装Python / Django模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆