title: How to change locale in python in windows?
body: <p>I want to format price in integer to properly formatted currency. Example 10000 to  or ₹10,000</p>
  
  <p>So, I am using the following commands in python</p>
  
  <pre><code>import locale
  locale.setlocale(locale.LC_MONETARY, 'en_US')
  or
  locale.setlocale(locale.LC_MONETARY, 'en_IN')
  print str(locale.currency(10000, grouping=True))
  </code></pre>
  
  <p><strong>When I use the above commands in python in ubuntu in different laptop, they are working perfectly fine. But, on windows they are not working.</strong></p>
  
  <p>Its giving me error as follows</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\locale.py", line 581, in setlocale
      return _setlocale(category, locale)
  locale.Error: unsupported locale setting
  </code></pre>
  
  <p><strong>How to solve this error ?</strong></p>
  
  <p>I am using Windows 10. I open cmd and type "python" enter. The python shell is presented with following version. There I type the above commands.</p>
  
  <pre><code>Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32
  </code></pre>
  
  <p><strong>Note :-</strong> I tried copying the locale.py file from python directory in ubuntu system to Windows directory i.e., "C:\Python27\Lib" but its still not working.</p>