【发布时间】:2021-06-08 20:52:05
【问题描述】:
我在 PowerShell wsl pipenv run python ~/test.py 中运行以下命令并收到以下错误 /bin/bash: pipenv: command not found。如果我启动 WSL/Ubuntu,我可以运行 pipenv run python ~/test.py 并获得成功的输出。在 PowerShell 和 Git Bash 中,我可以运行 pipenv -h 并获得正确的输出。 WSL 在哪里寻找这个命令?
在相关说明中,当我启动 WSL/Ubuntu 并获得成功输出时,我可以运行 python ~/test.py 和 python3 ./test.py。但在 PowerShell 中,只有 wsl python3 ~/test.py 有效。当我运行wsl python ~/test.py 时,我收到相同的命令未找到错误。我错过了什么?
【问题讨论】:
标签: python python-3.x powershell ubuntu windows-subsystem-for-linux