2

I'm having trouble installing python 3.5.0+ on AppVeyor. The arguments I'm using to call subprocess.check_output are:

[u'python-3.6.3-amd64.exe', u'/quiet', u'TargetDir=C:\\Python363-x64', u'AssociateFiles=0', u'Shortcuts=0', u'Include_doc=0', u'Include_launcher=0', u'InstallLauncherAllUsers=0', u'Include_tcltk=0', u'Include_test=0'] 

The installer returns a non-zero status code with the following log file:

https://pastebin.com/jmMpiXmH

(sorry for using the pastebin, it's long and apparently stackoverflow has a character limit)

After the installer exits, no python is installed in the requested TargetDir (C:\\Python363-x64). Actually the directory is not even created and it does not help if I create it manually beforehand.

I've tried to first run /uninstall (thought that it might skip installation because of the already installed versions of appveyor), but the same issue persists. I've tried both /passive and /quiet options. I've also tried this on other python versions (3.5.0+) with no luck. (earlier versions have .msi installers and they install properly)

I would like to know if anyone else can reproduce this issue or if you know what I'm doing wrong.

2
  • There are multiple versions of Python already pre-installed on AppVeyor build workers: appveyor.com/docs/build-environment/#python Commented Apr 9, 2018 at 23:00
  • Yes, but I need to run some tests on a few specific versions of python that are not per-installed. Commented Apr 10, 2018 at 0:55

2 Answers 2

4

This is a sample PowerShell script installing Python 3.6.4 on AppVeyor environment:

Write-Host "Installing Python 3.6.4 x64..." -ForegroundColor Cyan Write-Host "Downloading..." $exePath = "$env:TEMP\python-3.6.4-amd64.exe" (New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe', $exePath) Write-Host "Installing..." cmd /c start /wait $exePath /quiet TargetDir=C:\Python36-x64 Shortcuts=0 Include_launcher=1 InstallLauncherAllUsers=1 

Feel free to adopt it for your needs.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! using cmd seems to required. Any idea why it's not working in ps directly? PS> & "$exePath" /quiet ...?
0

In my case, using DefaultAllUsersTargetDir and/or DefaultJustForMeTargetDir instead of TargetDir worked in a Powershell script.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.