Pipenv fails to start zsh
See original GitHub issueIssue description
Pipenv fails to start zsh.
Expected result
A zsh subshell.
Actual result
pipenv shell
crashes with the following stacktrace.
Launching subshell in virtual environment…
Traceback (most recent call last):
File "/home/remco/.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/cli.py", line 665, in shell
three=three, python=python, fancy=fancy, shell_args=shell_args, pypi_mirror=pypi_mirror
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/core.py", line 2163, in do_shell
shell.fork_compat(*fork_args)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/shells.py", line 107, in fork_compat
self.cmd, ['-i'], dimensions=(dims.lines, dims.columns),
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 204, in __init__
self._spawn(command, args, preexec_fn, dimensions)
File "/home/remco/.local/lib/python3.6/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 276, in _spawn
'executable: %s.' % self.command)
pipenv.vendor.pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: -/bin/zsh.
I stepped into choose_shell with a debugger. Apparently type_
is 'zsh'
, and command
is -/bin/zsh
.
Steps to replicate
I use Tilix and zsh. It just crashes when I run pipenv shell
.
When I run pipenv shell
from another TTY, it just works as expected.
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --support
Pipenv version: '2018.7.1'
Pipenv location: '/home/remco/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python3'
Other Python installations in PATH
:
-
2.7
:/usr/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/usr/bin/python3.6m
-
3.6
:/usr/bin/python3.6
-
2.7.15
:/usr/bin/python
-
2.7.15
:/usr/bin/python2
-
3.6.5
:/usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-22-generic',
'platform_system': 'Linux',
'platform_version': '#24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
SESSION_MANAGER
XDG_SESSION_ID
LC_IDENTIFICATION
WINDOWPATH
DISPLAY
XDG_SEAT
DBUS_STARTER_ADDRESS
COLORTERM
GNOME_DESKTOP_SESSION_ID
DEFAULTS_PATH
QT_QPA_PLATFORMTHEME
LOGNAME
TEXTDOMAIN
JAVA_HOME
LC_TIME
SHELL
PATH
LC_NUMERIC
LC_PAPER
IM_CONFIG_PHASE
TEXTDOMAINDIR
CLUTTER_IM_MODULE
QT4_IM_MODULE
INVOCATION_ID
XDG_MENU_PREFIX
GNOME_SHELL_SESSION_MODE
XAUTHORITY
XDG_SESSION_DESKTOP
MOZ_USE_OMTC
QT_IM_MODULE
SSH_AUTH_SOCK
LC_MEASUREMENT
LC_ADDRESS
XMODIFIERS
MANDATORY_PATH
XDG_CONFIG_DIRS
GDMSESSION
USERNAME
DESKTOP_SESSION
XDG_RUNTIME_DIR
GTK_IM_MODULE
GTK_MODULES
USER
PWD
ANDROID_SDK_ROOT
VTE_VERSION
LC_MONETARY
HOME
QT_ACCESSIBILITY
SSH_AGENT_PID
XDG_DATA_DIRS
MANAGERPID
LANG
LC_NAME
GPG_AGENT_INFO
SHLVL
JOURNAL_STREAM
DBUS_STARTER_BUS_TYPE
XDG_VTNR
TILIX_ID
XDG_SESSION_TYPE
DBUS_SESSION_BUS_ADDRESS
XDG_CURRENT_DESKTOP
TERM
_
LC_TELEPHONE
OLDPWD
ZSH
LESSHISTFILE
LESSOPEN
PYTHONSTARTUP
PAGER
LESS
LC_CTYPE
LSCOLORS
LS_COLORS
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/remco/.gem/ruby/2.5.0/bin:/home/remco/.local/share/android-sdk/tools/bin:/home/remco/.local/share/android-sdk/tools:/home/remco/.local/share/android-sdk/platform-tools:/home/remco/.local/share/gradle/bin:/home/remco/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
SHELL
:/bin/zsh
LANG
:en_US.UTF-8
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
A workaround is to add the following to
.zshrc
:Closing as duplicate