How to write a batch file showing path to executable and version of Python handling Python scripts on Windows?

后端 未结 2 757
刺人心
刺人心 2020-12-18 16:15

It should display path to executable and version of Python for scripts run with direct invocation of Python (python myscript.py) as well as for scripts run dire

2条回答
  •  时光说笑
    2020-12-18 17:07

    This might be what you're looking for:

    python -c "import sys; print sys.executable"
    

提交回复
热议问题