我正在使用zsh
的Linux Windows子系统,并且仅安装了python3
。
我运行youtube-dl
时说/usr/bin/env: ‘python’: No such file or directory
which python
产生python not found
which python3
产生/usr/bin/python3
我尝试过使用别名,但不确定是否要添加到$PATH
中的./zshrc
中,但是没有用...
# 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
答案 0 :(得分:0)
我有同样的问题。懒惰的我刚刚从CLI调用了python安装程序,并告诉它以这种方式使用youtube-dl。
/ usr / bin / python3 / usr / local / bin / youtube-dl https://www.youtube.com/watch?v=wpiaCbch-iY
我敢肯定有正确的方法来做到这一点,但我没有研究它,因为它可行。