WSL:/ usr / bin / env:“ python”:没有这样的文件或目录

时间:2018-12-06 10:15:22

标签: python zsh windows-subsystem-for-linux oh-my-zsh

我正在使用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

1 个答案:

答案 0 :(得分:0)

我有同样的问题。懒惰的我刚刚从CLI调用了python安装程序,并告诉它以这种方式使用youtube-dl。

/ usr / bin / python3 / usr / local / bin / youtube-dl https://www.youtube.com/watch?v=wpiaCbch-iY

我敢肯定有正确的方法来做到这一点,但我没有研究它,因为它可行。