Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Python/Django Modules?

Tags:

python

django

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)?

like image 610
Matt Fordham Avatar asked Nov 30 '11 23:11

Matt Fordham


People also ask

Can I use Python modules in Django?

Can we use any python libraries in Django ( such as PDFplumber, pandas, etc) ? Yes, a Django app is just Python code. You can add whatever python code you want, including import pandas or whatever.

Can I install Django with pip?

Installing an official release with pip This is the recommended way to install Django. Install pip. The easiest is to use the standalone pip installer. If your distribution already has pip installed, you might need to update it if it's outdated.

Do I have to install Django for every project?

No you don't have to reinstall Django each time you make a new project, hopefully. Once you have installed it using pip , you just have to enter django-admin startproject <project-name> to get started.


1 Answers

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

like image 197
Arthur Neves Avatar answered Sep 30 '22 10:09

Arthur Neves