Installing Python
Select the latest version of Python from this link. Here you need to make a choice if you want to install Python 2.x or 3.x. Once you decide which Python to use, select the latest version of Python 2 or Python 3.
(If your machine is 64 bit, make sure you download 64 bit version.)
Difference between Python2 and Python 3
From python official website: Python 2.x is legacy, Python 3.x is the present and future of the language.
You can stick with Python 2.x. Simple rational is that one of the best reason for choosing python is availability of huge variety of packages and tools. Many tools and packages are yet to make transition to Python 3.x. Also Python 3.x doesn’t have backward compatibility so you might face issue with some of the package and some of these packages might not work with python 3.x. You can make transition to 3.x once you have fairly comfortable with python.
Once you download .msi file, install Python in the same manner you install any other application. Python will create a new directory on c drive named C:\Python27
To work seamlessly with python make sure PATH variable is updated correctly.
Go to Control Panel\System and Security\System> Select Advanced System Setting>Environment Variable. You would see path variable. Click edit.
Make sure you have following libraries added there. If these are not present add below libraries there.
C:\Python27;C:\Python27\Scripts;
You can also go to this place by right clicking My Computer and select properties> Environment Variable
Installing pip
If you are installing latest version of Python, It already have pip in it. I have Python 2.7.10 and it already had it.
If due to any reason you want to install previous version of Python which doesn’t come with pip pre-installed you can install pip by following below steps
1. Go to https://pip.pypa.io/en/latest/installing.html
2. Download get-pip.py.
3. Type below command on command prompt
python get-pip.py
Check current version of pip using following command
pip list
If pip that you have installed is of older version you can upgrade it by 'pip install --upgrade pip' command.
Installing virtualenv
Virtualenv is a tool to create isolated Python environments. Why do you need it? Well sometime you need to work with different version of different packages, lets say you are using django 1.8 for current project but you have specific requirements to use Django 1.6 for some other project. How do you manage that ? You create virtual python environment for these and install whatever version you want on that. This way you could work on both the projects from same machine.
Thanks to pip that you have installed before, installing any package will be breeze. Just type below command on command shell and you have virtualenv
pip install virtualenv
For further details about virtualenv check out this link or this link
Below installation are required only for web applications. If your motive is anything other than web development or you are simply trying to learn Python, you don’t need these installed.
Installing Django
Django is one of the most widely used framework for web development. Most of the startups are choosing Django with Python or Ruby with rails. Well, more on that sometime later. To install Django just type below command.
pip install Django
If you want to install any specific version type below command
pip install Django=1.8.0
Installing Boostrap
Boostrap is most widely use and almost standard for front end development. Frankly speaking you don’t have to install it, you just have to download it and save it in required folder. Which folder? The folder from which you would refer CSS files. More on it sometime later.
Installing PostgreSQL
I chose PostgreSQL over MySQL for following reasons:
- Development community on general mentioned that PostgreSQL offers some additional features which are not present on MySQL. Whether I need those features or not is different issue altogether but when I need them I don’t want to stare at database migration.
- PostgreSQL is support on Openshift as well as heroku. My plan is to host my web app on Openshift which supports both but just in case I want to migrate to heroku, I don’t want to do database migration work.
- (This may not be true but my assumption) since MySQL is now with Oracle, I suspect there would certainly keep adding new feature to Oracle and delay these on MySQL…. Well that’s just my guess.
Follow these simple steps:
- Download PostgreSQL from this link: http://www.enterprisedb.com/products-services-training/pgdownload#windows
- Type this command on command prompt pip install psycopg2
- If you are facing issue with installation with pip command check this link to download and manually install.
- Open pgAdmin3.exe from C:\Program Files\PostgreSQL\9.4\bin or whichever folder you have installed it.
