How do I have my python script run with a specific version of python?

Bobby's Avatar

Bobby

02 Aug, 2018 01:55 PM

I'm having trouble finding documentation that specifically describes what's needed, but I suspect I'm missing some environment variables.

I have an on_finish command that looks like so:

- cmd: python .\pythonHelloWorld.py

It seems to currently default to using Python 2.7.15, but I would like to use Python 3.7, which looks like it's preinstalled:
https://www.appveyor.com/docs/build-environment/#python

What do I add to my appveyor.yml file to have that script run using my desired version of Python? I tried the following, didn't seem to work:

  environment:
    matrix:
      - PYTHON: "C:\\Python37"

  1. Support Staff 1 Posted by Owen McDonnell on 02 Aug, 2018 03:45 PM

    Owen McDonnell's Avatar

    Try adding - SET PATH=%PYTHON%;%PATH% somewhere before you call the python command.

  2. Ilya Finkelshteyn closed this discussion on 02 Oct, 2018 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Oct, 2018 10:37 PM
23 Oct, 2018 08:45 PM
23 Oct, 2018 07:48 PM
23 Oct, 2018 06:50 PM
23 Oct, 2018 06:06 PM