bash脚本失败了python3.8:找不到命令
我是新手的狂欢和脚本。
简而言之,我要运行特定的构建,其中一项任务失败了。这是我第一次运行此构建,所以我期待各种问题。
该脚本以:#!/usr/bin/env bash
的失败:python3.8:命令在第X行中找不到
,这是:python33 。
➜ ~ which python3
/usr/bin/python3
➜ ~ which python
/usr/bin/python
➜ ~ python3 --version
Python 3.8.9
alias python3.8='python3'
python3.8终端现在键入'python3.8'。
这个问题的根源是什么?我知道我可能已经搞砸了很多事情。我也对所有这些狂欢概况感到困惑。在加载默认bash时使用ZSH?它是从哪里命令的?
感谢任何帮助...
I'm new to bash and scripting in general.
In short, I'm to run a particular build and one of the tasks fails. This is the first time I'm running this build so I was expecting all sort of issues.
The script starts with: #!/usr/bin/env bash
And fails with : python3.8: command not found
at line X, which is: python3.8 -m venv $ENV_PATH
I'm using zsh, brew installed.
Which python:
➜ ~ which python3
/usr/bin/python3
➜ ~ which python
/usr/bin/python
Exact version:
➜ ~ python3 --version
Python 3.8.9
I also edited the .zshrc file and added an alias:
alias python3.8='python3'
And it opens up the Python3.8 terminal when I type 'python3.8' now.
What could be the source of this issue? I know I might have messed up a lot of things. I'm also confused with all of these Bash profiles. Using zsh while it loads the default bash? where does it take it's commands from?
Appreciate any help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要采购路径:在致电Python之前,应该放置:
Shell脚本中的路径与系统路径不同,因此您需要在Shell脚本中源源。
You need to source your PATH: Before you call python, you should put:
The path in the shell script is different from your system path, so you need to source your system path within the shell script.