How To Install and Configure Python in Windows Server 2008/2003 (IIS 6.0 or 7.0)?

1. Install Python

Go to Python official website http://www.python.org/download/ and download the latest Windows installer (.msi). Follow the screen and install it.

2. Configure IIS Web Service Extensions

Open Start -> Administrative Tools > Internet Information Services (IIS) Manager. Click "Web Service Extensions" and add a new web service 'C:\Python25\python.exe -u "%s" "%s"'.

3. Configure Website to Enable Python

Go to website that you want to eanble Phyton. Right click the website and go to Properties > Home Directory > Configurations > Mappings. Add a new script mapping ".py" with 'C:\Python25\python.exe -u "%s" "%s"'.

4. Test Python

Write a test file test.py and test it out. Everything should work now.

        print
        print 'Status: 200 OK'
        print 'Content-type: text/html'
        print

        print '<HTML><HEAD><TITLE>Python Sample CGI</TITLE></HEAD>'
        print '<BODY>'
        print '<H1>This is a header</H1>'

        print '<p>' #this is a comment
        print 'See this is just like most other HTML'
        print '<br>'
        print '</BODY>'
    

5. Configure Control Panel (Optional)

If you have a control panel for your server, you may need to configure it as well. Below is a sample for Helm control panel.

Navigator

Other Knowledgebase Articles

Basic Windows Hosting

# of Domains: 4
# of SQL Server Databases: 4
Disk Space: 50GB
Bandwidth: Unmetered
SQL Server 2014
Monthly: $4.99
More Information About Free Shared Windows Hosting Plan

Express Hyper-V Hosting

Dedicated Memory:2GB
Disk Space: 100GB
Bandwidth: Unmetered
Windows 2012/2008: Free
Monthly: $11.99
More Information About Express Windows Hyper-V Server

Dedicated Windows Server

CPU: Quad-Core X3440 CPU
RAM: 16GB RAM
Disk: 2x120GB SSD + 300GB SATA
RAID: RAID 1
Bandwidth: Unmetered
Windows 2012/2008: Free
Monthly: $79.00
More Information About Dedicated Windows Server with SSD
SQL Server Hosting | ASP.NET Hosting | DotNetNuke Hosting | Windows Hyper-V Hosting | Dedicated SQL Server Hosting