使用gitbash的时候,构建python虚拟环境,出现以下错误
test -d venv || python3.9 -m venv venv
/usr/bin/sh: line 1: python3.9: command not found
make: *** [Makefile:19: venv/bin/activate] Error 127
使用gitbash的时候,构建python虚拟环境,出现以下错误
test -d venv || python3.9 -m venv venv
/usr/bin/sh: line 1: python3.9: command not found
make: *** [Makefile:19: venv/bin/activate] Error 127
关注这个错误提示意味着你的操作系统中没有名为 python3.9 的可执行文件,导致构建 Python 虚拟环境失败,我再项目中也遇到过这种问题。
你可以尝试以下解决方案:
python3.9 --version 来检查。python3.9 可执行文件的位置。python3.9 为 python3,因为某些操作系统中,Python 3.9 被安装为 python3。