使用情况:当你使用bat文件调用python执行一个.py文件时
但是执行.py的文件使用了 Anaconda创建的虚拟环境
下面演示了执行 ChatYuan_v5.bat 调用 ChatYuan_v5.py运行
ChatYuan_v5.bat ,bat文件的编码改成ANSI
call activate tensorflow
python -u F:\ChatYuan_\ChatYuan_v6.py
pause
如果你的cmd丢失路径了
REM 将cmd.exe所在目录添加到系统搜索路径中:需要注意的是,此命令需要以管理员身份运行才能生效。
setx path "%path%;C:\Windows\System32"