Bash 命令在 pipelinev shell 中不起作用

Bash 命令在 pipelinev shell 中不起作用

我正在学习 Django 进行后端和全栈开发。我认为在虚拟环境中使用 Pipenv 可能会给后端带来痛苦(至少在 macOS 上)。在终端中,我进入 pipelinev shell,一些常见的 bash 命令不再起作用(例如“ls”和一些存储到 PATH 变量的命令,如“code”)。我附上了一个视频来说明这是如何不起作用的:

Pipenv shell bash 命令不起作用的 YouTube 视频

还有其他人遇到过这个问题吗?谢谢!

编辑:根据用户群请求,我添加了文本:

mbGem:booklist lamidotijjo$ echo $PATH
/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/lamidotijjo/.dotnet/tools:/Library/Apple/usr/bin:/Users/lamidotijjo/ia:/usr/local/mysql-8.0.31-macos12-arm64/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
mbGem:booklist lamidotijjo$ pwd
/Users/lamidotijjo/Projects/booklist
mbGem:booklist lamidotijjo$ pipenv install django
Installing django...
Installing dependencies from Pipfile.lock (79baf8)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
mbGem:booklist lamidotijjo$ pipenv shell
Launching subshell in virtual environment...

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$  . /Users/lamidotijjo/.local/share/virtualenvs/Projects-3XO0tcpO/bin/activate
(Projects) bash-3.2$ ls
bash: ls: command not found
(Projects) bash-3.2$ ls -l
bash: ls: command not found
(Projects) bash-3.2$ code
bash: code: command not found
(Projects) bash-3.2$ code .
bash: code: command not found
(Projects) bash-3.2$ 

相关内容