通过 pip( pip install pipenv
) 安装时,在 zsh shell 上找不到命令pipenv
。
如果通过brew
:安装它brew install pipenv
,然后运行pipenv shell
,出现错误
Loading .env environment variables...
Launching subshell in virtual environment...
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/cli/command.py", line 429, in shell
do_shell(
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py", line 2387, in do_shell
shell.fork_compat(*fork_args)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/shells.py", line 106, in fork_compat
c = pexpect.spawn(self.cmd, ["-i"], dimensions=(dims.lines, dims.columns))
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 205, in __init__
self._spawn(command, args, preexec_fn, dimensions)
File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 276, in _spawn
raise ExceptionPexpect('The command was not found or was not ' +
pipenv.vendor.pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: /use/bin/zsh.
没有路径命名/use/bin/zsh
。为什么不稳定?
外壳路径是
echo $SHELL
/bin/zsh