[RESOLVED] Anaconda

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
davidbkk
Messages: 24
Registration: May 15, 2020 - 08:29

September 15, 2020 - 08:12

Good morning,

I have a problem with Anaconda3-2020.07-Windows-x86_64; it installs perfectly on all the identical machines (we just deployed them), but on some, for some unknown reason, Anaconda does not launch with the error: "This application failed to start because it could not find or load the Qt platform plugin "windows". Reinstalling the application may fix this problem.".

The only way to solve this problem is to launch a conda cmd with admin rights with the command "conda install qt", there is a prompt asking for y/n which must be passed for the command to succeed.

My question is: how do I add this to the end of the Anaconda installation in my script, but more importantly, how do I pass the y/n prompt to cmd?
Or another solution, perhaps a Qt package...

Thank you for your help

Here is my script if needed.

Code: Select all

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

uninstallkey = []

# raccourcis
RaccourcisPathExe = r'C:\ProgramData\Anaconda3\pythonw.exe'
RaccourcisArguments = r'C:\ProgramData\Anaconda3\cwp.py C:\ProgramData\Anaconda3 C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py'
RaccourcisArguments1 = r'C:\ProgramData\Anaconda3\cwp.py C:\ProgramData\Anaconda3 C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\Scripts\spyder-script.py'
RaccourcisDossier = "_LFIB MATHS"
RaccourcisName = u"Anaconda Navigator (Anaconda3)"
RaccourcisName2 = u"Spyder (Anaconda3)"
RaccourcisName3 = u"Anaconda Powershell Prompt (Anaconda3)"
RaccourcisName4 = u"Anaconda Prompt (Anaconda3)"
RaccourcisName5 = u"Jupyter Notebook (Anaconda3)"
RaccourcisName6 = u"Reset Spyder Settings (Anaconda3)"
RaccourcisDossierProgramm = r"C:\ProgramData\Anaconda3"
ExeName = 'pythonw.exe'
ExeName2 = 'pythonw.exe'
def install():
    if os.path.isdir('C:\ProgramData\Anaconda3') == False:
        install_exe_if_needed("Anaconda3-2020.07-Windows-x86_64.exe",'/InstallationType=AllUsers /RegisterPython=1 /S',key='',min_version='2020.02')
    else:
        print ('Anaconda already install')

    print('Creation du lien dans le menu demarrer _LFIB MATHS')
    #create_programs_menu_shortcut(RaccourcisName,target=RaccourcisPathExe,arguments=RaccourcisArguments,icon=r'C:\ProgramData\Anaconda3\pkgs\anaconda-navigator-1.9.12-py38_0\info\recipe\navigator.ico',folder=RaccourcisDossier)
    #create_programs_menu_shortcut(RaccourcisName2,target=RaccourcisPathExe,arguments=RaccourcisArguments1,icon=r'C:\ProgramData\Anaconda3\pkgs\spyder-4.1.4-py38_0\Scripts\spyder.ico',folder=RaccourcisDossier)
    copytree2(r'icone',r'c:\ProgramData\Microsoft\Windows\Start Menu\Programs\_LFIB MATHS')

def uninstall():
    print('uninstalling Anaconda')
    run(r'"C:\ProgramData\Anaconda3\Uninstall-Anaconda3.exe" /S')

    print('Supression du lien dans le menu demarrer _LFIB MATHS')
    remove_programs_menu_shortcut(RaccourcisName,folder=RaccourcisDossier)
    remove_programs_menu_shortcut(RaccourcisName2,folder=RaccourcisDossier)
    remove_programs_menu_shortcut(RaccourcisName3,folder=RaccourcisDossier)
    remove_programs_menu_shortcut(RaccourcisName4,folder=RaccourcisDossier)
    remove_programs_menu_shortcut(RaccourcisName5,folder=RaccourcisDossier)
    remove_programs_menu_shortcut(RaccourcisName6,folder=RaccourcisDossier)
Config:
Debian 10
Wapt 1.8.2
Windows 10 x64
Last edited by davidbkk on 22 Sep 2020 - 04:31, edited 1 time.
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

September 18, 2020 - 3:27 PM

Good morning,

On the first launch of Anaconda, it seems to install these dependencies. I imagine that without them it fails to launch, but to install dependencies you need administrator privileges since the installation takes place in Program Files.
We therefore need to find a solution to install the prerequisites during the installation process. I've found a first lead, which still needs to be tested. Here is the code:

Code: Select all

# Chemin à adapter : "C:\Program Files\Anaconda3\Scripts\activate.bat"
run('"%s"' % makepath(app_dir,'Scripts','activate.bat'))
Sources:
https://github.com/ContinuumIO/anaconda ... +the+Qt%22
https://github.com/ContinuumIO/anaconda ... sues/10309

Sincerely,
Jimmy
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

September 18, 2020 - 3:38 PM

Davidbkk,

My first answer is probably a bad lead.
The command that should resolve the issue is:

Code: Select all

conda install qt --quiet --offline --use-local --yes
Source : https://docs.conda.io/projects/conda/en... stall.html

I'll see about integrating all of this into the Store package ;)

Sincerely,
Jimmy
davidbkk
Messages: 24
Registration: May 15, 2020 - 08:29

September 21, 2020 - 03:59

Hello,

thank you for your reply. How do I integrate these commands into an Anaconda shell?
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

September 21, 2020 - 2:12 PM

Hello,

By "integrating these commands into an Anaconda shell," do you mean integrating the command into the WAPT package?

If so, it's relatively complex because it involves modifying the Python environment during the WAPT package deployment.
I was able to integrate the relevant part into the WAPT Store package; I suggest you adapt your package based on it, or vice versa. Here it is:

https://store.wapt.fr/store/tis-anaconda3

Regards,
Jimmy
davidbkk
Messages: 24
Registration: May 15, 2020 - 08:29

September 22, 2020 - 4:31 AM

Thank you very much, I will indeed take your package.
Locked