ewdurbin/evacuate_2stp

It errors on macOS High Sierra with Python 3.6, what should I Do?

iblueer opened this issue · 5 comments

pipenv Warning: the environment variable LANG is not set!

Solvement:
terminal instructions input:

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

This seems to be related to pipenv being installed to your Python 3.7 environment.

This may be considered a bug in pipenv or pew.

I was able to reproduce by installing pipenv into my python 3.7 environment and attempting install after unsetting those environment variables:

$ pip3.7 install --user pipenv
$ unset LANG
$ unset LC_ALL
$ ~/Library/Python/3.7/bin/pipenv --rm
Removing virtualenv (/Users/ewdurbin/.local/share/virtualenvs/evacuate_2stp-AuI8jHJj)...
ewd3imacpro:evacuate_2stp ewdurbin$ ~/Library/Python/3.7/bin/pipenv install
Warning: the environment variable LANG is not set!
We recommend setting this in ~/.profile (or equivalent) for proper expected behavior.
Creating a virtualenv for this project...
Pipfile: /Users/ewdurbin/ernestd/evacuate_2stp/Pipfile
Using /usr/local/bin/python3.6m (3.6.6) to create virtualenv...
⠋Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/pew/__main__.py", line 8, in <module>
    import pew
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/patched/pew/__init__.py", line 3, in <module>
    from . import pew
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/patched/pew/pew.py", line 44, in <module>
    from pew._utils import (check_call, invoke, expandpath, own, env_bin_dir,
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/patched/pew/_utils.py", line 25, in <module>
    encoding = locale.getlocale()[1] or 'ascii'
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 587, in getlocale
    return _parse_localename(localename)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

Virtualenv location: 
Traceback (most recent call last):
  File "/Users/ewdurbin/Library/Python/3.7/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/cli.py", line 435, in install
    selective_upgrade=selective_upgrade,
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/core.py", line 1759, in do_install
    pypi_mirror=pypi_mirror,
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/core.py", line 614, in ensure_project
    path_to_python = which('python') or which('py')
  File "/Users/ewdurbin/Library/Python/3.7/lib/python/site-packages/pipenv/core.py", line 115, in which
    p = os.path.join(location, 'bin', command)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@iblueer what are the values of LANG and LC_ALL that are defaulted in your shell?

by default, mine are showing as

$ echo $LANG
en_US.UTF-8
$ echo $LC_ALL

Actually.....blank.
2018-08-17 10 24 31

Closing as stale.