# RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment

**URL:** https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460
**Category:** User Support
**Tags:** install
**Created:** [December 14, 2018, 12:03pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460 "2018-12-14T12:03:16Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![JIM](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@JIM](https://forum.qiime2.org/u/JIM)
#### Post date: [December 14, 2018, 12:03pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/1 "2018-12-14T12:03:16Z")

</div>

Hi, everyone, I installed the QIIME2 with miniconda2, and when I ` source activate qiime2-2018.11`,it shows errors

```auto
Traceback (most recent call last):
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/_unicodefun.py", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from. The following suitable locales were
discovered: aa_DJ.utf8, aa_ER.utf8, aa_ET.utf8, af_ZA.utf8, am_ET.utf8, an_ES.utf8, ar_AE.utf8, ar_BH.utf8, ar_DZ.utf8, ar_EG.utf8, ar_IN.utf8, ar_IQ.utf8, ar_JO.utf8, ar_KW.utf8, ar_LB.utf8, ar_LY.utf8, ar_MA.utf8, ar_OM.utf8, ar_QA.utf8, ar_SA.utf8, ar_SD.utf8, ar_SY.utf8, ar_TN.utf8, ar_YE.utf8, as_IN.utf8, ast_ES.utf8, az_AZ.utf8, be_BY.utf8, ber_DZ.utf8, ber_MA.utf8, bg_BG.utf8, bn_BD.utf8, bn_IN.utf8, bo_CN.utf8, bo_IN.utf8, br_FR.utf8, bs_BA.utf8, byn_ER.utf8, ca_AD.utf8, ca_ES.utf8, ca_FR.utf8, ca_IT.utf8, crh_UA.utf8, cs_CZ.utf8, csb_PL.utf8, cv_RU.utf8, cy_GB.utf8, da_DK.utf8, de_AT.utf8, de_BE.utf8, de_CH.utf8, de_DE.utf8, de_LU.utf8, dv_MV.utf8, dz_BT.utf8, el_CY.utf8, el_GR.utf8, en_AG.utf8, en_AU.utf8, en_BW.utf8, en_CA.utf8, en_DK.utf8, en_GB.utf8, en_HK.utf8, en_IE.utf8, en_IN.utf8, en_NG.utf8, en_NZ.utf8, en_PH.utf8, en_SG.utf8, en_US.utf8, en_ZA.utf8, en_ZW.utf8, es_AR.utf8, es_BO.utf8, es_CL.utf8, es_CO.utf8, es_CR.utf8, es_DO.utf8, es_EC.utf8, es_ES.utf8, es_GT.utf8, es_HN.utf8, es_MX.utf8, es_NI.utf8, es_PA.utf8, es_PE.utf8, es_PR.utf8, es_PY.utf8, es_SV.utf8, es_US.utf8, es_UY.utf8, es_VE.utf8, et_EE.utf8, eu_ES.utf8, fa_IR.utf8, fi_FI.utf8, fil_PH.utf8, fo_FO.utf8, fr_BE.utf8, fr_CA.utf8, fr_CH.utf8, fr_FR.utf8, fr_LU.utf8, fur_IT.utf8, fy_DE.utf8, fy_NL.utf8, ga_IE.utf8, gd_GB.utf8, gez_ER.utf8, gez_ET.utf8, gl_ES.utf8, gu_IN.utf8, gv_GB.utf8, ha_NG.utf8, he_IL.utf8, hi_IN.utf8, hne_IN.utf8, hr_HR.utf8, hsb_DE.utf8, ht_HT.utf8, hu_HU.utf8, hy_AM.utf8, id_ID.utf8, ig_NG.utf8, ik_CA.utf8, is_IS.utf8, it_CH.utf8, it_IT.utf8, iu_CA.utf8, iw_IL.utf8, ja_JP.utf8, ka_GE.utf8, kk_KZ.utf8, kl_GL.utf8, km_KH.utf8, kn_IN.utf8, ko_KR.utf8, kok_IN.utf8, ks_IN.utf8, ku_TR.utf8, kw_GB.utf8, ky_KG.utf8, lg_UG.utf8, li_BE.utf8, li_NL.utf8, lo_LA.utf8, lt_LT.utf8, lv_LV.utf8, mai_IN.utf8, mg_MG.utf8, mi_NZ.utf8, mk_MK.utf8, ml_IN.utf8, mn_MN.utf8, mr_IN.utf8, ms_MY.utf8, mt_MT.utf8, my_MM.utf8, nb_NO.utf8, nds_DE.utf8, nds_NL.utf8, ne_NP.utf8, nl_AW.utf8, nl_BE.utf8, nl_NL.utf8, nn_NO.utf8, no_NO.utf8, nr_ZA.utf8, nso_ZA.utf8, oc_FR.utf8, om_ET.utf8, om_KE.utf8, or_IN.utf8, pa_IN.utf8, pa_PK.utf8, pap_AN.utf8, pl_PL.utf8, ps_AF.utf8, pt_BR.utf8, pt_PT.utf8, ro_RO.utf8, ru_RU.utf8, ru_UA.utf8, rw_RW.utf8, sa_IN.utf8, sc_IT.utf8, sd_IN.utf8, se_NO.utf8, shs_CA.utf8, si_LK.utf8, sid_ET.utf8, sk_SK.utf8, sl_SI.utf8, so_DJ.utf8, so_ET.utf8, so_KE.utf8, so_SO.utf8, sq_AL.utf8, sq_MK.utf8, sr_ME.utf8, sr_RS.utf8, ss_ZA.utf8, st_ZA.utf8, sv_FI.utf8, sv_SE.utf8, ta_IN.utf8, te_IN.utf8, tg_TJ.utf8, th_TH.utf8, ti_ER.utf8, ti_ET.utf8, tig_ER.utf8, tk_TM.utf8, tl_PH.utf8, tn_ZA.utf8, tr_CY.utf8, tr_TR.utf8, ts_ZA.utf8, tt_RU.utf8, ug_CN.utf8, uk_UA.utf8, ur_PK.utf8, ve_ZA.utf8, vi_VN.utf8, wa_BE.utf8, wo_SN.utf8, xh_ZA.utf8, yi_US.utf8, yo_NG.utf8, zh_CN.utf8, zh_HK.utf8, zh_SG.utf8, zh_TW.utf8, zu_ZA.utf8

```

So, what can I do for solving for this error?  
THANKS!

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [December 14, 2018, 12:46pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/2 "2018-12-14T12:46:43Z")

</div>

Hi @JIM

I think I had a similar issue with set up. At some point, working on a non-english/non american cluster, I had to add the following lines to my bashrc to deal with some of the language issues. I'm not sure if it will work for you, but it's work a try.

```auto
LC_ALL=en_US
export LC_ALL

```

Best,  
Justine

---

<div class="post-metadata">

### Author: ![JIM](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@JIM](https://forum.qiime2.org/u/JIM)
#### Post date: [December 15, 2018, 1:43pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/3 "2018-12-15T13:43:11Z")

</div>

Thanks, Justine. I used this way `export LC_ALL=en_AG.utf8, en_AU.utf8, en_BW.utf8, en_CA.utf8, en_DK.utf8, en_GB.utf8, en_HK.utf8, en_IE.utf8, en_IN.utf8,en_NG.utf8, en_NZ.utf8, en_PH.utf8, en_SG.utf8, en_US.utf8, en_ZA.utf8, en_ZW.utf8`, every `en_*.utf8` I tried, but, it didnt work. ..

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [December 15, 2018, 1:57pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/4 "2018-12-15T13:57:09Z")

</div>

Did you try

```auto
LC_ALL=en_US
export LC_ALL

```

Rather than using the UTF-8 specification?

Best,  
Justine

---

<div class="post-metadata">

### Author: ![JIM](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@JIM](https://forum.qiime2.org/u/JIM)
#### Post date: [December 18, 2018, 1:08pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/5 "2018-12-18T13:08:43Z")

</div>

Thank you for your reply. And it doesn't work.

```auto
(qiime2-2018.11) [mgb217@smp2 ~]$ LC_ALL=en_US
(qiime2-2018.11) [mgb217@smp2 ~]$ export LC_ALL
(qiime2-2018.11) [mgb217@smp2 ~]$ qiime --help
Traceback (most recent call last):
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/_unicodefun.py", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from. The following suitable locales were
discovered: aa_DJ.utf8, aa_ER.utf8, aa_ET.utf8, af_ZA.utf8, am_ET.utf8, an_ES.utf8, ar_AE.utf8, ar_BH.utf8, ar_DZ.utf8, ar_EG.utf8, ar_IN.utf8, ar_IQ.utf8, ar_JO.utf8, ar_KW.utf8, ar_LB.utf8, ar_LY.utf8, ar_MA.utf8, ar_OM.utf8, ar_QA.utf8, ar_SA.utf8, ar_SD.utf8, ar_SY.utf8, ar_TN.utf8, ar_YE.utf8, as_IN.utf8, ast_ES.utf8, az_AZ.utf8, be_BY.utf8, ber_DZ.utf8, ber_MA.utf8, bg_BG.utf8, bn_BD.utf8, bn_IN.utf8, bo_CN.utf8, bo_IN.utf8, br_FR.utf8, bs_BA.utf8, byn_ER.utf8, ca_AD.utf8, ca_ES.utf8, ca_FR.utf8, ca_IT.utf8, crh_UA.utf8, cs_CZ.utf8, csb_PL.utf8, cv_RU.utf8, cy_GB.utf8, da_DK.utf8,.....
```

---

<div class="post-metadata">

### Author: ![ChrisKeefe](https://forum.qiime2.org/user_avatar/forum.qiime2.org/chriskeefe/32/1907_2.png) [@ChrisKeefe](https://forum.qiime2.org/u/ChrisKeefe)
#### Post date: [December 20, 2018, 3:39am UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/6 "2018-12-20T03:39:26Z")

</div>

@JIM, forgive me if I'm wrong, but this _does_ seem like a locale issue at first glance.  
Please use the following commands to check the values of your system's locale environment variables, and paste the output here.

```auto
echo $LC_ALL
echo $LANG

```

[These snippets](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/5) might help you get things patched up if the variables return no values, or similar.

Good luck!  
CK

---

<div class="post-metadata">

### Author: ![JIM](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@JIM](https://forum.qiime2.org/u/JIM)
#### Post date: [December 24, 2018, 4:16pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/7 "2018-12-24T16:16:27Z")

</div>

Thanks,@ChrisKeefe.  
The output is

```auto
(qiime2-2018.11) [mgb217@smp2 envs]$ echo $LC_ALL
C
(qiime2-2018.11) [mgb217@smp2 envs]$ echo $LANG
en_US.UTF-8
```

---

<div class="post-metadata">

### Author: ![ChrisKeefe](https://forum.qiime2.org/user_avatar/forum.qiime2.org/chriskeefe/32/1907_2.png) [@ChrisKeefe](https://forum.qiime2.org/u/ChrisKeefe)
#### Post date: [December 25, 2018, 3:58am UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/8 "2018-12-25T03:58:22Z")

</div>

@JIM, it looks like setting `LC_ALL=en_US.UTF-8` either didn't take, or has been reverted to `C`.

Try using this to set it again...

> [@System locale settings and q2cli](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/5):
>
> export LC\_ALL=en\_US.UTF-8

... then checking the value again using `echo $LC_ALL`.

If the setting has updated to en\_US.UTF-8, try your commands again to see whether there's a different outcome. If that doesn't work, you might try the second approach Thermokarst suggests in [this post](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/5), setting the variable on a temporary basis, while running your command.

If these suggestions don't help, let us know what response you get and we'll go from there. Thanks for your patience,  
Chris

---

<div class="post-metadata">

### Author: ![JIM](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@JIM](https://forum.qiime2.org/u/JIM)
#### Post date: [December 25, 2018, 1:00pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/9 "2018-12-25T13:00:18Z")

</div>

@ChrisKeefe Thank you very much! I open a new shell windows, and `export LC_ALL=en_US.UTF-8`, then`echo $LC_ALL`,and it shows`en_US.UTF-8`,when I `source activate qiime2-2018.11`, it shows :

```auto
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Traceback (most recent call last):
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/public/home/mgb217/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/click/_unicodefun.py", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from. The following suitable locales were
discovered: aa_DJ.utf8, aa_ER.utf8, aa_ET.utf8.......
Click discovered that you exported a UTF-8 locale
but the locale system could not pick up from it because
it does not exist. The exported locale is "en_US.UTF-8" but it
is not supported

```

And then, I use the method of @thermokarst`export LC_ALL=en_US.UTF-8 && export LANG=en_US.UTF-8`,`source activate qiime2-2018.11`,it shows same with above.Last, I used `LC_ALL=C.UTF-8 LANG=C.UTF-8`,it shows `-bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory`

---

<div class="post-metadata">

### Author: ![ChrisKeefe](https://forum.qiime2.org/user_avatar/forum.qiime2.org/chriskeefe/32/1907_2.png) [@ChrisKeefe](https://forum.qiime2.org/u/ChrisKeefe)
#### Post date: [December 26, 2018, 5:30pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/10 "2018-12-26T17:30:35Z")

</div>

@JIM. Is this a centOS system?  
The Click documentation referenced in your error message mentions that

> `On some systems it was reported that UTF-8 has to be written as UTF8 and vice versa. `

Try `export LC_ALL=en_US.utf8`  
If that doesn't work, try `export LC_ALL=en_US.UTF8`

Sorry this is taking so long to work out!  
🤔🙏😓  
Chris

---

<div class="post-metadata">

### Author: ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)
#### Post date: [January 25, 2019, 7:28pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/12 "2019-01-25T19:28:20Z")

</div>

Hello, I'm having a similar problem but I get an additional line about how to fix the problem. I'm looking at the site, but so far I don't understand what to do since I am clueless about python. I use qiime1.9.1 with no problems by the way. I am reanalyzing some old data and wanted to use the newer qiime version.

RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult [https://click.palletsprojects.com/en/7.x/python3/](https://click.palletsprojects.com/en/7.x/python3/) for mitigation steps.

I'm going to try and use the fixes you suggested to Jim but perhaps there is a better way????  
Thanks.

---

<div class="post-metadata">

### Author: ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)
#### Post date: [January 25, 2019, 7:39pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/13 "2019-01-25T19:39:35Z")

</div>

Hi, I still got a weird error when I used the code but qiime 2 opened:

LC\_ALL=en\_US  
export LC\_ALL

I got:  
Unable to revert mtime: /Library/Fonts

So I went back and read the mitigation stepson the website from my previous email and though I didn't understand all the stuff about problems with python3 and click the suggested code did work perfectly. You have to run it before activating qiime2:

export LC\_ALL=en\_US.utf-8  
export LANG=en\_US.utf-8

Hopefully that is OK!!

---

<div class="post-metadata">

### Author: ![ChrisKeefe](https://forum.qiime2.org/user_avatar/forum.qiime2.org/chriskeefe/32/1907_2.png) [@ChrisKeefe](https://forum.qiime2.org/u/ChrisKeefe)
#### Post date: [January 25, 2019, 9:24pm UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/16 "2019-01-25T21:24:03Z")

</div>

@bmillerlab, I'm glad you were successful in fixing the original issue. In case it helps in the future, I believe this is roughly what's going on: Python 3 thinks you are restricted to ASCII data. By setting your locale variables, you are telling Click, a Python package, how to handle unicode characters appropriately.

As for the second error (or warning?), it's not something I've run into before. If it seems to create problems, please feel free to create a new post and we can try to help troubleshoot.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [February 26, 2019, 3:34am UTC](https://forum.qiime2.org/t/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment/7460/18 "2019-02-26T03:34:13Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
