Linked Questions
24 questions linked to/from Python locale error: unsupported locale setting
5 votes
0 answers
634 views
How do I convert a localized number to a decimal number in Python? [duplicate]
I have a string in the format 100.000,53 (my country uses points as thousands separator and a comma as the decimal separator). I know about: import locale locale.setlocale(locale.LC_NUMERIC, 'de_DE') ...
0 votes
0 answers
53 views
How to fix issue "Error: unsupported locale setting" [duplicate]
When I'm run my python script, I have the following issue : "Error: unsupported locale setting". It happened when the line run : locale.setlocale(locale.LC_ALL, "fr_FR.utf8") I ...
195 votes
32 answers
250k views
pyvenv not working because ensurepip is not available
I upgraded from ubuntu 14.04 to ubuntu 16.04 a few days ago. When I try to create a virtual env by using pyvenv .venv or python3 -m venv .venv There is an error: The virtual environment was not ...
197 votes
26 answers
611k views
ImportError: No Module Named bs4 (BeautifulSoup) [duplicate]
I'm working in Python and using Flask. When I run my main Python file on my computer, it works perfectly, but when I activate venv and run the Flask Python file in the terminal, it says that my main ...
221 votes
18 answers
263k views
How to set the locale inside a Debian/Ubuntu Docker container? [closed]
I'm running a Ubuntu Docker container. I have a Norwegian keyboard and need to use Norwegian characters (øæå). My Terminal character encoding is set to UTF-8 and I'm connected to my container using ...
256 votes
10 answers
217k views
pip install - locale.Error: unsupported locale setting
Full stacktrace: ➜ ~ pip install virtualenv Traceback (most recent call last): File "/usr/bin/pip", line 11, in <module> sys.exit(main()) File "/usr/lib/python3.4/site-packages/pip/...
28 votes
3 answers
34k views
Calendar: day/month names in specific locale
I am playing with Python's calendar module that's in the standard library. Basically I need a list of all days of a month, like so: >>> import calendar >>> calobject = calendar....
13 votes
5 answers
8k views
Android Studio Debugger process finished with exit code 127
Recently upgraded to Android Studio 4.2.1 I can launch my app successfully but when I try to attach the debugger I get the error in the question title (see screenshot below). The app just gets stuck ...
4 votes
3 answers
9k views
How to change locale in python in windows?
I want to format price in integer to properly formatted currency. Example 10000 to or ₹10,000 So, I am using the following commands in python import locale locale.setlocale(locale.LC_MONETARY, '...
0 votes
1 answer
10k views
Simple way to plot time series with real dates using pandas
Starting from the following CSV data, loaded into a pandas data frame... Buchung;Betrag;Saldo 27.06.2016;-1.000,00;42.374,95 02.06.2016;500,00;43.374,95 01.06.2016;-1.000,00;42.874,95 13.05.2016;-500,...
1 vote
2 answers
5k views
Parse date and change format from spanish
This might be a duplicated question but since I have read all the comments about it and I don't solve my question I have to ask again. I am working with a dataframe where I Have a column with this ...
2 votes
1 answer
6k views
python: locale.Error: unsupported locale setting
my code has: def sep(num, lang='en', none_is_zero=False): if num is None: if none_is_zero is False: return None else: return 0 try: locale....
4 votes
2 answers
2k views
How to translate pygtk; glade; gtk.Builder() application?
This is my first trial in translating pygtk glade; I have created Rockdome.mo file on the following dir:./locale/ar/LC_MESSAGES/Rockdome.mo def apply_locale(self , lang): domain = "...
0 votes
3 answers
1k views
How to convert str into float? ValueError: could not convert string to float: '0,25691372'
I'm using XGBoost for feature importance, I want to select the features that give me the 90 % of importance, so at first I build a Dataframe beacause I need it for excel and then I write a while cycle ...
8 votes
1 answer
2k views
How to set locale in AWS AMI Linux Lambda?
I have a small script in python, that make use of locale to format a number from 1.000,00 to 1,000.00 import re, locale locale.setlocale(locale.LC_ALL, 'es_PE.UTF-8') locale.atof(number) Then when ...