Closed densnow closed 1 year ago
Why would activation fail?
Anyhow, if you know how to check that activation failed, please do submit a PR. Thanks!
I am not sure exactly, but there is a thread on the m269-23j technical forum where someone was having issues with the script and this did occur (the output to the terminal was shared). I don't know whether this is all due to the "space in username" issue #27 or something else.
There have also been reports of the script not creating the environment for various reasons (maybe user skipping/missing certain instructions etc), so could be good to end the script if the environment is not created or activation fails.
Luckily it seems powershell uses the $?
variable to store exit status from the last command so just a case of a if (-not $?)
then do something.
I guess we should check if environment was created successfully, and also the activation?
We have had a couple of reports where the Python virtual environment was not created successfully, but the script will continue. For example in
install.ps1
if line 86 (. '$VENV\Scripts\Activate.ps1'
) fails, the script will continue, this means upgradingpip
and possibly installing packages fromrequirements.txt
into the global environment? Whatever the case, exiting with appropriate error message if the environment fails to be created could be something that is needed.