WSL: /usr/bin/env: ‘python’: 没有那个文件或目录
WSL: /usr/bin/env: ‘python’: No such file or directory
我在 Linux 的 Windows 子系统上使用 zsh
,并且只安装了 python3
。
当我运行youtube-dl
时,它说/usr/bin/env: ‘python’: No such file or directory
which python
产量 python not found
which python3
产量 /usr/bin/python3
我试过使用别名,但不确定是否可以在我的 ./zshrc
中添加到 $PATH
,但没有成功...
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# export PATH="/usr/bin/python3/bin:$PATH"
alias python=python3
# From awscli-install-linux doc
export PATH=~/.local/bin:$PATH
我遇到了同样的问题。由于懒惰,我只是从 CLI 调用了我的 python 安装,并告诉它以这种方式使用 youtube-dl。
/usr/bin/python3 /usr/local/bin/youtube-dl https://www.youtube.com/watch?v=wpiaCbch-iY
我确定有正确的方法可以做到这一点,但我没有研究它,因为它有效。
我在 Linux 的 Windows 子系统上使用 zsh
,并且只安装了 python3
。
当我运行youtube-dl
时,它说/usr/bin/env: ‘python’: No such file or directory
which python
产量 python not found
which python3
产量 /usr/bin/python3
我试过使用别名,但不确定是否可以在我的 ./zshrc
中添加到 $PATH
,但没有成功...
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# export PATH="/usr/bin/python3/bin:$PATH"
alias python=python3
# From awscli-install-linux doc
export PATH=~/.local/bin:$PATH
我遇到了同样的问题。由于懒惰,我只是从 CLI 调用了我的 python 安装,并告诉它以这种方式使用 youtube-dl。
/usr/bin/python3 /usr/local/bin/youtube-dl https://www.youtube.com/watch?v=wpiaCbch-iY
我确定有正确的方法可以做到这一点,但我没有研究它,因为它有效。