Page 1 of 1

[SOLVED] Matlab - no installation

Published: Dec 19, 2019 - 09:35
by SK62
Good morning,
When I try to install the attached package,

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import shutil

uninstallkey = []

def install():
    print('Installation Matlab_2019')
    mkdirs('c:\\temp')
    shutil.copy(r'\\srv-turing\Programmes\Matlab\R2019b\Licences\%s.lic' %get_computername(), r'C:\temp\license19b.lic')
    cmd = "//srv-turing/Programmes/Matlab/R2019b/setup.exe -inputFile \\srv-turing\Programmes\Matlab\R2019b\bp_input.txt"

    print (cmd)
    run_notfatal(cmd,timeout=60*60)

    while isrunning('Setup'):
        print ('Install en cours. Merci de patienter... :)')
        time.sleep(600)

    print('Installation terminée !!!')

def uninstall():
    print('desinstallation Matlab_2019')
    cmd = "C:\Program Files\MATLAB\R2019b\uninstall\bin\win64\uninstall.exe -inputFile \\srv-turing\Programmes\Matlab\R2019b\bp_uninstaller_input.txt"
The license copying process goes well, the setup seems to start since it appears in the processes, but no installation takes place.
the package fails in the console with
Installation Matlab_2019//srv-turing/Programmes/Matlab/R2019b/setup.exe -inputFile \srv-turing\Programmes\Matlab\R2019bp_input.txt
Install in progress. Please wait... :)[Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' [Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' [Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3846, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\waptbsx_zt\setup.py", line 18, in install
NameError: global name 'time' is not defined
NameError: global name 'time' is not defined
Do you have any ideas to help me out?

Sincerely

Re: Matlab - no installation

Published: Dec 19, 2019 - 09:46
by sfonteneau
Good morning

We are missing the time import

just add

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import shutil
import time

Matlab - no installation required

Published: Dec 20, 2019 - 07:48
by SK62
Hello,
Yes, thank you for pointing out the obvious import error. This fixes the error in WAPT, but it still doesn't allow me to install MATLAB. The setup process runs correctly, but nothing happens. Is this a permissions issue?
Does WAPT run the executable with administrator privileges?

Thank you for any suggestions, and happy holidays!

Re: [SOLVED] Matlab - no installation

Published: January 2, 2020 - 11:37 AM
by sfonteneau
Wapt launches installations with the system account, therefore with maximum rights...

On the other hand, in pyscripter or with the wapt-get install command, the installation is launched with the administrator account which executes the installation.

Re: [SOLVED] Matlab - no installation

Published: April 23, 2020 - 8:32 PM
by Vincent
Hello,

I'm reviving this thread, but it might be useful to others.

Your problem might stem from a timeout that's too short for Matlab. I set mine to 7200. That's more than enough for machines with SSDs, but necessary for older generation hard drives or for testing packaging with a virtual machine.

V.

Re: [SOLVED] Matlab - no installation

Published: March 1, 2021 - 3:42 PM
by JPBUTT
Hello,
I'm trying to create a Matlab package and I'm encountering the same difficulties as you with the Matlab installation, with a Matlab process that won't close.
Have you found a solution?




# -*- coding: utf-8 -*-
from setuphelpers import *
import time
uninstallkey = []

def install():
print ('Copying installation files')
mkdirs('C:\\MATLAB')
filecopyto('license.lic',r'C:\MATLAB')
filecopyto('UTT_installer_input.txt',r'C:\MATLAB')
##copytree2(r'\\lune.utt.fr\software\MATLAB','C:\\MATLAB')
##time.sleep(900)
print('Matlab installation')
run(r'"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"')
##cmd = "setup.exe -inputFile C:\MATLAB\UTT_installer_input.txt"
time.sleep(7200)
print('copy the uninstallation response file')
filecopyto('UTT_uninstaller_input.txt',r'C:\Program Files\MATLAB\R2019\uninstall')



def uninstall():
print('uninstall Matlab_2019')
run(r'"C:\Program Files\MATLAB\R2019\uninstall\bin\win64\uninstall.exe" -inputfile "C:\Program Files\MATLAB\R2019\uninstall\UTT_uninstaller_input.txt"')
time.sleep(7200)
remove_tree(r'C:\Program Files\MATLAB')

Copying installation files
Matlab installation
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3877, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\waptufzl6z\setup.py", line 14, in install
run(r'"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"')
File "C:\Program Files (x86)\wapt\common.py", line 3647, in run
return ensure_unicode(setuphelpers.run(*arg,**args))
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 3703, in run
raise TimeoutExpired(cmd,''.join(output),timeout)
TimeoutExpired: Command '"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"' timed out after 600 seconds with output ''''
TimeoutExpired: Command '"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"' timed out after 600 seconds with output ''''