[Windows] Error checking for installation commands not working
Hello, I just had a very weird issue trying to use this because in Windows 10 "python3" is an alias that points you to the Microsoft store python page by default.
Even though I already had python installed, it couldn't find it because it was only present as "python" by default (I am using anaconda)
The issue is actually in the error checking, because the script continues even on failed commands.
The fact that it also restarts powershell for every command makes it hard to follow while it is running.
The errors are in French, so I annotated where they happen
(base) PS C:\Users\Lelou> npx dalai llama install 13B
mkdir C:\Users\Lelou\dalai
{ method: 'install', callparams: [ '13B' ] }
extracting pythoncontained python 0% /
cleaning up temp filesined python 100%[====================================================================>] done
exec: pip3 install --user virtualenv in undefined
Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.
Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
Le chargement des profils personnels et système a duré 2436 ms.
(base) PS C:\Users\Lelou> pip3 install --user virtualenv
Requirement already satisfied: virtualenv in d:\lelou\appdata\roaming\python\python39\site-packages (20.21.0)
Requirement already satisfied: filelock<4,>=3.4.1 in c:\users\lelou\anaconda3\lib\site-packages (from virtualenv) (3.6.0)
Requirement already satisfied: platformdirs<4,>=2.4 in c:\users\lelou\anaconda3\lib\site-packages (from virtualenv) (2.5.2)
Requirement already satisfied: distlib<1,>=0.3.6 in d:\lelou\appdata\roaming\python\python39\site-packages (from virtualenv) (0.3.6)
(base) PS C:\Users\Lelou> exit
# EXIT { exitCode: 0, signal: undefined }
exec: python3 -m venv C:\Users\Lelou\dalai\venv in undefined
Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.
Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
Le chargement des profils personnels et système a duré 2361 ms.
(base) PS C:\Users\Lelou> python3 -m venv C:\Users\Lelou\dalai\venv
python3 : Le terme «python3» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe,
vérifiez que le chemin d'accès est correct et réessayez. << this was an error, since python3 does not exist
Au caractère Ligne:1 : 1
+ python3 -m venv C:\Users\Lelou\dalai\venv
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (python3:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(base) PS C:\Users\Lelou> exit
# EXIT { exitCode: 0, signal: undefined }
exec: C:\Users\Lelou\dalai\venv\Scripts\pip.exe install cmake in undefined << however, the script continues anyway and tries to install cmake
Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.
Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
Le chargement des profils personnels et système a duré 2447 ms.
(base) PS C:\Users\Lelou> C:\Users\Lelou\dalai\venv\Scripts\pip.exe install cmake
C:\Users\Lelou\dalai\venv\Scripts\pip.exe : Le terme «C:\Users\Lelou\dalai\venv\Scripts\pip.exe» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme
exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez. << the venv install didn't work, so error
Au caractère Ligne:1 : 1
+ C:\Users\Lelou\dalai\venv\Scripts\pip.exe install cmake
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Lelou\...Scripts\pip.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(base) PS C:\Users\Lelou> exit
# EXIT { exitCode: 0, signal: undefined }
exec: C:\Users\Lelou\dalai\venv\Scripts\pip.exe install --upgrade pip setuptools wheel in undefined
Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.
Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
Terminer le programme de commandes (O/N) ?
^C << I stopped it
(base) PS C:\Users\Lelou>
Few suggestions for using Anaconda
- use "Anaconda Prompt" with "run as administrator", not PowerShell.
- use conda command for Python virtual environment as "conda create -n myenv python=3.9", not "pip venv..."
- after "conda activate myenv", then start installation with npx command.
Try to just type "python3" in your terminal and see if it's installed or not. If it's not, you may have the microsoft store proposing to install it. Install it, then run again the install command. In you case even if you have installed python, "python3" is not registered in your path, while "python" is.