如何安装Python / Django模块? [英] How do I install Python/Django Modules?
问题描述
从项目目录我运行 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屋!