Thursday 23 May 2013

Install Django latest version in your system

 

How to get Django

Get the latest official version:

The latest official version is 1.5.1. You can get it by direct download:
First, download Django-1.5.1.tar.gz  Then:
put this tar file in any directory or drive and open your terminal(command prompt),
go through that directory (cd c:/programfile/)and give this command.
tar xzvf Django-1.5.1.tar.gz
cd Django-1.5.1
sudo python setup.py install
or use this command:
pip install Django==1.5.1
 then your Django is install succesfully.

 

 

Wednesday 22 May 2013

install Python in Window

 Method:1 

Step-1-First Download window installer file from here  Python 
Step-2-Now you can install above downloaded msi file.
Step-3-Go to Environment variables by below step

change environment variables:
  1. Right-click My Computer, and then click Properties.
  2. Click the Advanced tab.
  3. Click Environment variables.
  4. Click on the Path in System variable and edit.
  5. In last you add below line
         C:\Python27;C:\Python27\Scripts;

Now your python is installed and you can run python script anywhere in system.

Method:2

First Download Zip file from here  Python
Now extract it in C or any drive, then open the command prompt and go through directory where python zip file kept. just like as 
c: \>  cd c:\programfiles\python\
c: \programfiles\python> setup.py install
or
c: /programfiles/python>python setup.py install

Running setup.py install builds and installs all modules in one run. If you prefer to work incrementally—especially useful if you want to customize the build process, or if things are going wrong—you can use the setup script to do one thing at a time. This is particularly helpful when the build and install will be done by different users—for example, you might want to build a module distribution and hand it off to a system administrator for installation (or do it yourself, with super-user privileges).
For example, you can build everything in one step, and then install everything in a second step, by invoking the setup script twice:

python setup.py build
python setup.py install

Now your python is installed successfully

Install MySQL for Python (MySQLdb) on Windows
It took me quite a while to figure out how to build and install MySQL for Python (MySQLdb) on Windows. I’d better write it down.
Uncompressed MySQL-python-1.2.3c1.tar.gz into a directory. Open a command window (cmd), change to the directory.
Try to run, 
          setup.py build
Method:3

In this method open this Pdf and according to that install Python

   PDF 
 

Install Python in Linux (Ubuntu)

How To install Python in Linux (Ubuntu)

Method: 1
 
After install Linux, you can install python very easily by some command, so follow below steps,

1. first open your Terminal and go to root directory, see below picture and put this command

apt-get install lamp-server^  
 

so by this command lamp server will install.

  2. After install lamp server , check phpmyadmin is installed or not, if not install then give this command

apt-get install phpmyadmin 
 
3. Actually at the time of lamp server installation, python become install so you have to check python is install or not by this command

python
 
 if install then u will see like this,

root@BLR02BSS:~# python
Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

4.  In your system, if synaptic manager is not install then give this command

apt-get install synaptic

If synaptic manager is install already then on command terminal type

synaptic

It will open Synaptic manager there you search "python mysql", you will get below screen

then click on checkbox for mark as installation and Apply on the top
then Python mysqldb will install in your system

Now in your system python and mysqldb is installed successfully.


Method: 2

Step 1: Download and build Python
First Download Zip file from here  Python
Go to http://www.python.org/. In the "Quick links" section on the left-hand side of the page, "Source distribution" is a direct link to the tarball. Download it. Unzip the tarball, and from the root of the created directory (which will be called Python-2.7.2 or something similar, depending on the version): 
Open terminal  and put this command

./configure
 
make -j


You can now check that Python was correctly built by executing ./python and falling into its interactive terminal. If you want, you can also execute the Python test-suite with make test, though it may take a long time to run (~10 minutes on a relatively fast machine).

Step 2: Install
In the same directory, run:

sudo make install

This installs Python into /usr/local/bin. Depending on the configuration of your system, you may want to add symlinks to the newly created /usr/local/bin/python2.7 in /usr/bin/ as well.
That’s it, you now have Python 2.7 installed.
Now you can install Python mysqldb, follow above steps for python mysqldb.

or

Now extract it in C or any drive, then open the command prompt and go through directory where python zip file kept. just like as 
c: \>  cd c:\programfiles\python\
c: \programfiles\python> setup.py install
or 
c: /programfiles/python>python setup.py install