Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv crashes with an click error #1151

Closed
halloleo opened this issue Dec 3, 2017 · 4 comments
Closed

pipenv crashes with an click error #1151

halloleo opened this issue Dec 3, 2017 · 4 comments

Comments

@halloleo
Copy link

halloleo commented Dec 3, 2017

When running pipenv without any parameters (installed into Python 3.6) I get:

Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 676, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Consult http://click.pocoo.org/python3/for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from.  The following suitable locales where
discovered: af_ZA.UTF-8, am_ET.UTF-8, be_BY.UTF-8, bg_BG.UTF-8, ca_ES.UTF-8, cs_CZ.UTF-8, da_DK.UTF-8, de_AT.UTF-8, de_CH.UTF-8, de_DE.UTF-8, el_GR.UTF-8, en_AU.UTF-8, en_CA.UTF-8, en_GB.UTF-8, en_IE.UTF-8, en_NZ.UTF-8, en_US.UTF-8, es_ES.UTF-8, et_EE.UTF-8, eu_ES.UTF-8, fi_FI.UTF-8, fr_BE.UTF-8, fr_CA.UTF-8, fr_CH.UTF-8, fr_FR.UTF-8, he_IL.UTF-8, hr_HR.UTF-8, hu_HU.UTF-8, hy_AM.UTF-8, is_IS.UTF-8, it_CH.UTF-8, it_IT.UTF-8, ja_JP.UTF-8, kk_KZ.UTF-8, ko_KR.UTF-8, lt_LT.UTF-8, nl_BE.UTF-8, nl_NL.UTF-8, no_NO.UTF-8, pl_PL.UTF-8, pt_BR.UTF-8, pt_PT.UTF-8, ro_RO.UTF-8, ru_RU.UTF-8, sk_SK.UTF-8, sl_SI.UTF-8, sr_YU.UTF-8, sv_SE.UTF-8, tr_TR.UTF-8, uk_UA.UTF-8, zh_CN.UTF-8, zh_HK.UTF-8, zh_TW.UTF-8

Environment:

OS is macOS 10.11
Python is 3.6.3
Terminal is (and has to be) set to ASCII.
LANG environment variable is not set (but could be if that helps).

@halloleo
Copy link
Author

halloleo commented Dec 3, 2017

More details:

Python installed via homebrew.
pipenv does run under Python 2.7 as long as only Python 2 venvs are created.

@techalchemy
Copy link
Member

@halloleo sorry that you ran into this issue, thanks for the report. There is actually a known issue with locale settings and MacOS terminals with regard to unicode. In order to run anything at all involving python3 or requiring unicode support (including pipenv) I think you'll have to set LC_ALL and LANG to something like en_US.UTF-8 in your .bash_profile (see also #187)

Hope that helps, and thanks again!

@halloleo
Copy link
Author

halloleo commented Dec 5, 2017

Thank @techalchemy! export LANGUAGE does the trick. This issue caused me so many headaches, because not only pipenv breaks but lots of python3 tools. The fix seem to work universally! :-)

@idchlife
Copy link

idchlife commented Jun 22, 2018

Interesting. In my zsh profile everything works normal, but with circus (https://circus.readthedocs.io) it breaks with this error. Too, macos. Will try with language

update:

works this:

[env]
LC_ALL = en_US.UTF-8
LANG = en_US.UTF-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants