Importing to IDLE on Mac OS Big Sur

I’ve found that I have trouble importing things to IDLE that work perfectly when ran in terminal. Most recently was locale. I’ve italicized and made bold the differences in results. Any direction is greatly appreciated.

This is from IDLE:

import locale
locale.setlocale(locale.LC_ALL, ‘’)
‘C/UTF-8/C/C/C/C’

total = 5.5
fmt_total = locale.currency(total, grouping=True)
Traceback (most recent call last):
File “<pyshell#3>”, line 1, in
fmt_total = locale.currency(total, grouping=True)
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/locale.py”, line 267, in currency
raise ValueError("Currency formatting is not possible using "
ValueError: Currency formatting is not possible using the ‘C’ locale.

This is terminal:

import locale

locale.setlocale(locale.LC_ALL, ‘’)

‘en_US.UTF-8’

total = 5.5

fmt_total = locale.currency(total, grouping=True)

print(‘Total=’, fmt_total)

Total= $5.50