@echo off title demo cmd "/c activate py36 && cd demo&& python demo_test.py" pause
其中,activate py36是安装完python3.7,想使用python3.6的写法,常规写法为:activate python3.6;
cd demo 是进入文件夹名为demo的目录下;
python demo_test.py 是执行demo_test.py文件
注:demo_test.py文件在文件夹demo下。
@echo off title demo cmd "/c activate py36 && cd demo&& python demo_test.py" pause
其中,activate py36是安装完python3.7,想使用python3.6的写法,常规写法为:activate python3.6;
cd demo 是进入文件夹名为demo的目录下;
python demo_test.py 是执行demo_test.py文件
注:demo_test.py文件在文件夹demo下。