Day 6: Exploring Python with Projects

To understand the sample code in the previous post Day 5, it would also be useful to refer to the official “The Python Language Reference”. I do a quick review of basic stuff like:

Coming back to projects, it is time to choose a more complicated project. This list at Quora could be useful across WEB DEVELOPMENT, DATA SCIENCE, MAKE GAMES, ROBOTICS, WORK AUTOMATION, etc.

Let us try web development using Django – www.djangoproject.com:

1. Let us hop over to How to install Django on Windows.

2. This introduces the “pip” – a package manager for Python – makes installing and uninstalling Python packages (such as Django!) very easy.

3. To install pip on your machine, go to https://pip.pypa.io/en/latest/installing/, and follow the Installing with get-pip.py instructions. This works out fine:

4. Next virtualenv and virtualenvwrapper (for a dedicated environment for Django projects) are recommend to be installed as a best practice (not mandatory). This works smoothly:

5. Next step: Create a virtual environment for your project – Run

mkvirtualenv myproject

The virtual environment is activated – see “(myproject)” next to the command prompt:

6. Install Django using pip within the virtual environment. In the command prompt, ensure your virtual environment is active, and execute the following command: pip install django

Done! End of day 6.

 

2 thoughts on “Day 6: Exploring Python with Projects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s