mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.57k stars 344 forks source link

`failed to create process.` while directly running packages which are installed from micromamba #2702

Closed goyalyashpal closed 11 months ago

goyalyashpal commented 11 months ago

Jump to https://github.com/mamba-org/mamba/issues/2702#issuecomment-1652409499 for conclusion.

Head ### Troubleshooting docs - [X] My problem is not solved in the Troubleshooting docs ### How did you install Mamba? Micromamba ### Search tried in issue tracker [run subprocess](https://github.com/mamba-org/mamba/issues?q=is%3Aissue+is%3Aopen+run+subprocess) ### Latest version of Mamba - [X] My problem is not solved with the latest version ### Tried in Conda? I didn't try
### Describe your issue On installing run-able packages from micromamba, it shows the error `failed to create process.` run-able packages which can be invoked on their own: tried with `conda-lock` & `flet` maybe following issues seem similar: * https://github.com/mamba-org/mamba/issues/1396 * https://github.com/mamba-org/mamba/issues/1467 P.S. the issue template is super awesome: [bug.yml](https://github.com/mamba-org/mamba/blob/0e2deaf/.github/ISSUE_TEMPLATE/bug.yml)
Tail ### mamba info / micromamba info ```shell libmamba version : 1.4.9 micromamba version : 1.4.9 curl version : libcurl/8.1.2-DEV Schannel zlib/1.2.13 libarchive version : libarchive 3.6.2 zlib/1.2.13 liblzma/5.4.3 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.5 envs directories : C:\Users\...\micromamba\envs package cache : C:\Users\...\micromamba\pkgs C:\Users\...\.mamba\pkgs C:\Users\...\AppData\Roaming\.mamba\pkgs environment : facerecog_env (active) env location : C:\Users\...\micromamba\envs\facerecog_env user config files : C:\Users\...\.mambarc populated config files : C:\Users\...\micromamba\.mambarc virtual packages : __win=0=0 __archspec=1=x86_64 __cuda=10.2=0 channels : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch base environment : C:\Users\\micromamba platform : win-64 ``` ### Logs ```shell $ conda-lock --help failed to create process. $ flet -r ./ failed to create process. $ micromamba -v run flet -r ./ failed to create process. $ micromamba -v run --env flet -r ./ error libmamba Did not receive any command to run inside environment ``` ### environment.yml ```yaml name: facerecog_env channels: - conda-forge dependencies: # Use foll to decide versions for adding new packages # mamba repoquery search # mamba --dry-run install # # If it's not the latest one, then try with latest one # to see what existing pkg would break # # Like in my case, it opt flet 0.7.4 against 0.8.0 to save pydantic # Obviously pydantic is a small pkg, whereas flet 0.7.4 would be # an instant legacy code. # # mamba --dry-run install == # # - python >=3.6,<3.7 - python >=3.11 - face-recognition==1.3.0 - numpy==1.25.1 - opencv==4.7.0 # - dlib==19.24.2 # - face_recognition_models==0.3.0 # - Pillow==10.0.0 - loguru - filetype==1.2.0 - flet==0.8.2 # prefix: "$USERPROFILE"/.../envs/ ``` ### ~/.condarc ```yaml # $ cat "$USERPROFILE/micromamba/.mambarc" channels: - conda-forge always_yes: false(facerecog_env) ```
jonashaag commented 11 months ago

Do you have a virus scanner on the machine? Could be blocking execution.

jonashaag commented 11 months ago

Btw it's micromamba run -n myenv mycommand

goyalyashpal commented 11 months ago

Btw it's micromamba run -n myenv mycommand

$ micromamba run -n facerecog_env flet -r ./
warning  libmamba 'root_prefix' set with default value: C:\Users\...\micromamba
failed to create process.

Do you have a virus scanner on the machine? Could be blocking execution.

nope, nothing other than the ms windows defender, and ms windows firewall. flet runs fine when installed/run in venv's virtual environment.

oh, and also, in the micromamba environment, on running with python -m

(i wish there was some official alias. micromamba is just way toooo long) (suggestions: umamba or umba or mmmba or mmba or mumba ~or mcmba~ ;;; )

$ python -m flet -r .
C:\Users\...\micromamba\envs\facerecog_env\python.exe: No module named flet.__main__; 'flet' is a package and cannot be directly executed  
$ micromamba install conda-lock
conda-forge/noarch
4m:43.3s
conda-forge/win-64
6m:54.6s

Pinned packages:
  - python 3.11.*

Transaction

  Prefix: C:\Users\...\micromamba\envs\facerecog_env

  All requested packages already installed

$ conda-lock --help
failed to create process.

$ python -m conda-lock
C:\Users\...\micromamba\envs\facerecog_env\python.exe: No module named conda-lock
goyalyashpal commented 11 months ago

hi! @jonashaag sorry for nagging, but is there any way to make it run? maybe u know some workaround or some troubleshooting?

i don't usually rush things, & I understand that stuff take time; but it was a bit urgent this time as i was on a task deadline...

sorry again πŸ™

jonashaag commented 11 months ago

I don't know how to fix this failed to create process. error, sorry

jonashaag commented 11 months ago

How about

micromamba run -n myenv python -m flet -r .
goyalyashpal commented 11 months ago

no go... even tried with cmd too

$ (facerecog_env) $ micromamba run -n facerecog_env python -m flet -r .
warning  libmamba 'root_prefix' set with default value: C:\Users\...\micromamba
C:\Users\...\micromamba\envs\facerecog_env\python.exe: No module named flet.__main__; 'flet' is a package and cannot be directly executed  

on a cmd shell (started directly from start menu):

> (facerecog_env) >flet -r
failed to create process.

> (facerecog_env) >micromamba run -n facerecog_env python -m flet -r
C:\Users\...\micromamba\envs\facerecog_env\python.exe: No module named flet.__main__; 'flet' is a package and cannot be directly executed

on a powershell (started direectly from start):

couldn't even activate the micromamba environment

Trying to activate in powershell ```powershll PS C:\Users\....> micromamba.exe activate facerecog_env critical libmamba Shell not initialized 'micromamba' is running as a subprocess and can't modify the parent shell. Thus you must initialize your shell before using activate and deactivate. To initialize the current powershell shell, run: $ micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression and then activate or deactivate with: $ micromamba activate To automatically initialize all future (powershell) shells, run: $ micromamba shell init --shell powershell --root-prefix=~/micromamba If your shell was already initialized, reinitialize your shell with: $ micromamba shell reinit --shell powershell Otherwise, this may be an issue. In the meantime you can run commands. See: $ micromamba run --help Supported shells are {bash, zsh, csh, xonsh, cmd.exe, powershell, fish}. ``` ``` PS C:\Users\....> micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression Import-Module : The specified module '\condabin\Mamba.psm1' was not loaded because no valid module file was found in any module directory. At line:1 char:1 + Import-Module "$Env:MAMBA_ROOT_PREFIX\condabin\Mamba.psm1" -ArgumentL ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (\condabin\Mamba.psm1:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand Remove-Variable : Cannot find a variable with the name 'MambaModuleArgs'. At line:3 char:1 + Remove-Variable MambaModuleArgs + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MambaModuleArgs:String) [Remove-Variable], ItemNotFoundException + FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.RemoveVariableCommand ``` ``` PS C:\Users\....> micromamba shell init --shell powershell --root-prefix=~/micromamba Init powershell profile at 'C:\Users\....\Documents\WindowsPowerShell\profile.ps1' Adding (or replacing) the following in your "C:\\Users\\....\\Documents\\WindowsPowerShell\\profile.ps1" file #region mamba initialize # !! Contents within this block are managed by 'mamba shell init' !! $Env:MAMBA_ROOT_PREFIX = "C:\Users\....\micromamba" $Env:MAMBA_EXE = "D:\StandalonePrograms\micromamba\micromamba.exe" (& $Env:MAMBA_EXE 'shell' 'hook' -s 'powershell' -p $Env:MAMBA_ROOT_PREFIX) | Out-String | Invoke-Expression #endregion Windows long-path support already enabled. ``` ``` PS C:\Users\....> micromamba activate critical libmamba Shell not initialized 'micromamba' is running as a subprocess and can't modify the parent shell. Thus you must initialize your shell before using activate and deactivate. ... MORE ... ``` ``` PS C:\Users\....> micromamba shell reinit --shell powershell Modifying RC file "C:\\Users\\....\\.bash_profile" Generating config for root prefix "C:\\Users\\....\\micromamba" Setting mamba executable to: "D:\\StandalonePrograms\\micromamba\\micromamba.exe" Adding (or replacing) the following in your "C:\\Users\\....\\.bash_profile" file # >>> mamba initialize >>> # !! Contents within this block are managed by 'mamba init' !! export MAMBA_EXE='/d/StandalonePrograms/micromamba/micromamba.exe'; export MAMBA_ROOT_PREFIX='/c/Users/..../micromamba'; eval "$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX")" # <<< mamba initialize <<< Windows long-path support already enabled. cmd.exe already initialized. Windows long-path support already enabled. Init powershell profile at 'C:\Users\....\Documents\WindowsPowerShell\profile.ps1' Adding (or replacing) the following in your "C:\\Users\\....\\Documents\\WindowsPowerShell\\profile.ps1" file #region mamba initialize # !! Contents within this block are managed by 'mamba shell init' !! $Env:MAMBA_ROOT_PREFIX = "C:\Users\....\micromamba" $Env:MAMBA_EXE = "D:\StandalonePrograms\micromamba\micromamba.exe" (& $Env:MAMBA_EXE 'shell' 'hook' -s 'powershell' -p $Env:MAMBA_ROOT_PREFIX) | Out-String | Invoke-Expression #endregion Windows long-path support already enabled. ``` ``` PS C:\Users\....> micromamba activate facerecog_env critical libmamba Shell not initialized 'micromamba' is running as a subprocess and can't modify the parent shell. Thus you must initialize your shell before using activate and deactivate. ... MORE ... ```
goyalyashpal commented 11 months ago

'e' keey is misbhaving sporadically on my kyboard, so .... ignor th rrors

on reading 'micromamba' is running as a subprocess and can't modify the parent shell. (also while did in bash) so many tims; i rcalled that maybe i read some instructions about launching mamba as a gui (or a shell? - idr) - i thought maybe similar thing had to be done for micromamba as well...

i think i am conflating it from somwhr ls - and a quick sarch kinda confirms that...

goyalyashpal commented 11 months ago

so, i thought to use mambaforge instead of micromamba, but failed to activate the environment there:

Console logs ```console $ # After installing mambaforge at D:\ProgramFils\mambaforge $ # setting up the path, & modifying .conda_rc $ cat "$USERPROFILE/.condarc" channels: - conda-forge always_yes: false # root-dir: # - "D:/StandalonePrograms/mamba_root" envs_dirs: - "D:/StandalonePrograms/mamba_root/envs" pkgs_dirs: - "D:/StandalonePrograms/mamba_root/pkgs" # update_dependencies: True $ _conda info active environment : None user config file : C:\Users\....\.condarc populated config files : C:\Users\....\.condarc conda version : 22.11.1 conda-build version : not installed python version : 3.9.15.final.0 virtual packages : __archspec=1=x86_64 __cuda=10.2=0 __win=0=0 base environment : C:\WINDOWS\TEMP\_MEI122282 (read only) conda av data dir : C:\WINDOWS\TEMP\_MEI122282\etc\conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch package cache : D:\StandalonePrograms\mamba_root\pkgs envs directories : D:\StandalonePrograms\mamba_root\envs C:\Users\....\.conda\envs C:\WINDOWS\TEMP\_MEI122282\envs C:\Users\....\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.15 Windows/10 Windows/10.0.19041 administrator : False netrc file : None offline mode : False $ _conda activate CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If using 'conda activate' from a batch script, change your invocation to 'CALL conda.bat activate'. To initialize your shell, run $ conda init Currently supported shells are: - bash - cmd.exe - fish - tcsh - xonsh - zsh - powershell See 'conda init --help' for more information and options. IMPORTANT: You may need to close and restart your shell after running 'conda init'. $ _conda init bash WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: C:\WINDOWS\TEMP\_MEI29522 ERROR during elevated execution. rc: [WinError 0] The operation completed successfully. needs sudo C:\WINDOWS\TEMP\_MEI29522\Scripts\conda.exe needs sudo C:\WINDOWS\TEMP\_MEI29522\Scripts\conda-env.exe modified C:\WINDOWS\TEMP\_MEI29522\Scripts\conda-script.py modified C:\WINDOWS\TEMP\_MEI29522\Scripts\conda-env-script.py needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\conda.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\Library\bin\conda.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\_conda_activate.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\rename_tmp.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\conda_auto_activate.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\conda_hook.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\Scripts\activate.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\activate.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\condabin\deactivate.bat needs sudo C:\WINDOWS\TEMP\_MEI29522\Scripts\activate needs sudo C:\WINDOWS\TEMP\_MEI29522\Scripts\deactivate needs sudo C:\WINDOWS\TEMP\_MEI29522\etc\profile.d\conda.sh needs sudo C:\WINDOWS\TEMP\_MEI29522\etc\fish\conf.d\conda.fish needs sudo C:\WINDOWS\TEMP\_MEI29522\shell\condabin\Conda.psm1 needs sudo C:\WINDOWS\TEMP\_MEI29522\shell\condabin\conda-hook.ps1 needs sudo C:\WINDOWS\TEMP\_MEI29522\etc\profile.d\conda.csh modified C:\Users\....\.bash_profile ==> For changes to take effect, close and re-open your current shell. <== Operation failed. ```
jonashaag commented 11 months ago

Something is really messed up with your system

goyalyashpal commented 11 months ago

asked chat gpt as a duck ~debugger~ assistant... summary: create new env using conda create --prefix <new_path> python=<version>

tried doing this to avoid those "TEMP" directories - alas, no go

Inspections (meh) ```console $ _conda info --base C:\WINDOWS\TEMP\_MEI153442 $ ls C:\WINDOWS\TEMP\_MEI153442 ls: cannot access 'C:WINDOWSTEMP_MEI153442': No such file or di rectory $ # lol $ echo $CONDA_ROOT_PREFIX $ ls "$SAP/mamba_root" Scripts condabin envs etc pkgs $ export CONDA_ROOT_PREFIX="$SAP\mamba_root" $ _conda info --base D:\StandalonePrograms\mamba_root $ ^D ```
Actions ```console $ _conda info --base C:\WINDOWS\TEMP\_MEI21562 $ export CONDA_ROOT_PREFIX="$SAP\mamba_root" $ _conda info --base D:\StandalonePrograms\mamba_root $ _conda create --prefix base_nnot_found python=3.11 ... MORE ... Downloading and Extracting Packages Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate D:\base_nnot_found # # To deactivate an active environment, use # # $ conda deactivate $ # hufff πŸ€¦β€β™€οΈ Installed in current directory now! micromamba sends these to ROOT 😭 $ mv -t $SAP/mamba_root/envs base_nnot_found/ -v renamed 'base_nnot_found/' -> 'D:\StandalonePrograms/mamba_root/envs/base_nnot_found' $ _conda activate base_nnot_found CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If using 'conda activate' from a batch script, change your invocation to 'CALL conda.bat activate'. ... MORE ... $ _conda init bash WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: C:\WINDOWS\TEMP\_MEI157202 ERROR during elevated execution. rc: [WinError 0] The operation completed successfully. needs sudo C:\WINDOWS\TEMP\_MEI157202\Scripts\conda.exe needs sudo C:\WINDOWS\TEMP\_MEI157202\Scripts\conda-env.exe modified C:\WINDOWS\TEMP\_MEI157202\Scripts\conda-script.py modified C:\WINDOWS\TEMP\_MEI157202\Scripts\conda-env-script.py needs sudo C:\WINDOWS\TEMP\_MEI157202\condabin\conda.bat ... MORE ... needs sudo C:\WINDOWS\TEMP\_MEI157202\etc\profile.d\conda.csh modified C:\Users\....\.bash_profile ==> For changes to take effect, close and re-open your current shell. <== Operation failed. $ # Where's this getting these TEMP directories from???? $ _conda info --base D:\StandalonePrograms\mamba_root $ ^D ```
goyalyashpal commented 11 months ago

i rcalled that maybe i read some instructions about launching mamba as a gui (or a shell? - idr) - i thought maybe similar thing had to be done for micromamba as well...

i think i am conflating it from somwhr ls - and a quick sarch kinda confirms that... - https://github.com/mamba-org/mamba/issues/2702#issuecomment-1650247273

yes, it was from miniforge: "Miniforge Prompt"

that is to say, i tried going with miniforge distribution 23.1.0-4 and on launching the Miniforge Prompt; it launches me into this cmd shell with base environment already activated

oh NOoo.... it still showed the same failed to create process. in the end...

console logs for Miniforge Prompt ``` (base) %USERPROFILE%>conda --version conda 23.1.0 (base) %USERPROFILE%>which conda /d/ProgramFiles/miniforge3/Scripts/conda (base) %USERPROFILE%>conda info active environment : base active env location : D:\ProgramFiles\miniforge3 shell level : 1 user config file : %USERPROFILE%\.condarc populated config files : D:\ProgramFiles\miniforge3\.condarc %USERPROFILE%\.condarc conda version : 23.1.0 conda-build version : not installed python version : 3.10.12.final.0 virtual packages : __archspec=1=x86_64 __cuda=10.2=0 __win=0=0 base environment : D:\ProgramFiles\miniforge3 (read only) conda av data dir : D:\ProgramFiles\miniforge3\etc\conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch package cache : D:\ProgramFiles\miniforge3\pkgs %USERPROFILE%\.conda\pkgs %USERPROFILE%\AppData\Local\conda\conda\pkgs envs directories : D:\StandalonePrograms\mamba_root\envs %USERPROFILE%\.conda\envs D:\ProgramFiles\miniforge3\envs %USERPROFILE%\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/23.1.0 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.19045 administrator : False netrc file : None offline mode : False (base) C:\Users\Yash Pal Goyal>env | grep conda CONDA_EXE=D:\ProgramFiles\miniforge3\condabin\..\Scripts\conda.exe CONDA_EXES="D:\ProgramFiles\miniforge3\condabin\..\Scripts\conda.exe" PATH=/d/ProgramFiles/miniforge3:/d/ProgramFiles/miniforge3/Library/mingw-w64/bin:/d/ProgramFiles/miniforge3/Library/usr/bin:/d/ProgramFiles/miniforge3/Library/bin:/d/ProgramFiles/miniforge3/Scripts:/d/ProgramFiles/miniforge3/bin:/d/ProgramFiles/miniforge3/condabin: ... MORE ... (base) %USERPROFILE%>conda env list # conda environments: # base * D:\ProgramFiles\miniforge3 base_nnot_found D:\StandalonePrograms\mamba_root\envs\base_nnot_found facerecog_env D:\StandalonePrograms\mamba_root\envs\facerecog_env (base) %USERPROFILE%>conda activate facerecog_env (facerecog_env) %USERPROFILE%>D: (facerecog_env) D:\>cd 15_devt\GitHub\.....\flet-template (facerecog_env) D:\15_devt\GitHub\Oohr-master\flet-template>flet --version failed to create process. ```

Aside: I was wrongly trying with <mambaforge>/_conda.exe this whole above time & that caused the wrong locations for following to be picked - i admit it's blunder from my side... but umh, i guess a little bit of foolproofing won't hurt. Wrong picked locations:

So, here are some points or say tangible deliverables which can be added in mamba forge to smoothen the rough corners a bit... i am just collecting those here, will maybe move to a new comment after some time

$ micromamba activate 
To initialize the current bash shell, run:
    $ eval "$(micromamba shell hook --shell bash)"

Small investigation with Scripts/mamba.exe added in system path variable:

Bash Console logs ```console $ mamba info __ __ __ __ / \ / \ / \ / \ / \/ \/ \/ \ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ / / \ / \ / \ / \ \____ / / \_/ \_/ \_/ \ o \__, / _/ \_____/ ` |/ β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β• mamba (1.4.2) supported by @QuantStack GitHub: https://github.com/mamba-org/mamba Twitter: https://twitter.com/QuantStack β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ active environment : None user config file : C:\Users\....\.condarc populated config files : D:\ProgramFiles\mambaforge\.condarc C:\Users\....\.condarc conda version : 23.1.0 conda-build version : not installed python version : 3.10.12.final.0 virtual packages : __archspec=1=x86_64 __cuda=10.2=0 __win=0=0 base environment : D:\ProgramFiles\mambaforge (read only) conda av data dir : D:\ProgramFiles\mambaforge\etc\conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch package cache : D:\ProgramFiles\mambaforge\pkgs C:\Users\....\.conda\pkgs C:\Users\....\AppData\Local\conda\conda\pkgs envs directories : D:\StandalonePrograms\mamba_root\envs C:\Users\....\.conda\envs D:\ProgramFiles\mambaforge\envs C:\Users\....\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/23.1.0 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.19045 administrator : False netrc file : None offline mode : False $ mamba init __ __ __ __ / \ / \ / \ / \ / \/ \/ \/ \ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆ/ /β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ / / \ / \ / \ / \ \____ / / \_/ \_/ \_/ \ o \__, / _/ \_____/ ` |/ β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β• mamba (1.4.2) supported by @QuantStack GitHub: https://github.com/mamba-org/mamba Twitter: https://twitter.com/QuantStack β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ ERROR during elevated execution. rc: [WinError 0] The operation completed successfully. no change D:\ProgramFiles\mambaforge\Scripts\conda.exe no change D:\ProgramFiles\mambaforge\Scripts\conda-env.exe no change D:\ProgramFiles\mambaforge\Scripts\conda-script.py no change D:\ProgramFiles\mambaforge\Scripts\conda-env-script.py no change D:\ProgramFiles\mambaforge\condabin\conda.bat no change D:\ProgramFiles\mambaforge\Library\bin\conda.bat no change D:\ProgramFiles\mambaforge\condabin\_conda_activate.bat no change D:\ProgramFiles\mambaforge\condabin\rename_tmp.bat no change D:\ProgramFiles\mambaforge\condabin\conda_auto_activate.bat no change D:\ProgramFiles\mambaforge\condabin\conda_hook.bat no change D:\ProgramFiles\mambaforge\Scripts\activate.bat no change D:\ProgramFiles\mambaforge\condabin\activate.bat no change D:\ProgramFiles\mambaforge\condabin\deactivate.bat needs sudo D:\ProgramFiles\mambaforge\Scripts\activate needs sudo D:\ProgramFiles\mambaforge\Scripts\deactivate needs sudo D:\ProgramFiles\mambaforge\etc\profile.d\conda.sh needs sudo D:\ProgramFiles\mambaforge\etc\fish\conf.d\conda.fish no change D:\ProgramFiles\mambaforge\shell\condabin\Conda.psm1 needs sudo D:\ProgramFiles\mambaforge\shell\condabin\conda-hook.ps1 no change D:\ProgramFiles\mambaforge\Lib\site-packages\xontrib\conda.xsh needs sudo D:\ProgramFiles\mambaforge\etc\profile.d\conda.csh modified C:\Users\....\Documents\WindowsPowerShell\profile.ps1 modified HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun ==> For changes to take effect, close and re-open your current shell. <== Operation failed. ```
CMD Console Logs: Finally successsss πŸ˜ƒ ```console (facerecog_env) C:\Users\....>flet --version failed to create process. (facerecog_env) D:\15_devt\GitHub\Oohr-master>mamba install --update-all ... MORE ... too few arguments, must supply command line package specs or --file CondaValueError: too few arguments, must supply command line package specs or --file (facerecog_env) D:\15_devt\GitHub\Oohr-master>mamba install --update-all --file environment.yml ... MORE ... could not parse 'name: facerecog_env' in: environment.yml CondaValueError: could not parse 'name: facerecog_env' in: environment.yml (facerecog_env) D:\15_devt\GitHub\Oohr-master>cat req.txt face-recognition==1.3.0 numpy==1.25.1 opencv==4.7.0 loguru filetype==1.2.0 flet==0.8.2 (facerecog_env) D:\15_devt\GitHub\Oohr-master>mamba install --update-all --file req.txt Looking for: ['face-recognition==1.3.0', 'numpy==1.25.1', 'opencv==4.7.0', 'loguru', 'filetype==1.2.0', 'flet==0.8.2'] conda-forge/noarch 13.4MB @ 1.3MB/s 11.4s conda-forge/win-64 21.4MB @ 1.7MB/s 14.6s Pinned packages: - python 3.11.* Transaction Prefix: D:\StandalonePrograms\mamba_root\envs\facerecog_env Updating specs: - face-recognition==1.3.0 - numpy==1.25.1 - opencv==4.7.0 - loguru - filetype==1.2.0 - flet==0.8.2 - ca-certificates - certifi - openssl Package Version Build Channel Size ---------------------------------------------------------------------------- Upgrade: ---------------------------------------------------------------------------- - ca-certificates 2023.5.7 h56e8100_0 conda-forge + ca-certificates 2023.7.22 h56e8100_0 conda-forge/win-64 150kB - certifi 2023.5.7 pyhd8ed1ab_0 conda-forge + certifi 2023.7.22 pyhd8ed1ab_0 conda-forge/noarch 154kB - flet 0.8.1 pyhd8ed1ab_0 conda-forge + flet 0.8.2 pyhd8ed1ab_0 conda-forge/noarch 2MB - flet-core 0.8.1 pyhd8ed1ab_0 conda-forge + flet-core 0.8.2 pyhd8ed1ab_0 conda-forge/noarch 157kB - flet-runtime 0.8.1 pyhd8ed1ab_0 conda-forge + flet-runtime 0.8.2 pyhd8ed1ab_0 conda-forge/noarch 29kB Summary: Upgrade: 5 packages Total download: 2MB ---------------------------------------------------------------------------- Confirm changes: [Y/n] y certifi 153.8kB @ 311.2kB/s 0.5s ca-certificates 150.0kB @ 289.9kB/s 0.5s flet-runtime 29.1kB @ 46.5kB/s 0.6s flet-core 156.6kB @ 217.9kB/s 0.7s flet 1.7MB @ 787.1kB/s 2.2s Downloading and Extracting Packages Preparing transaction: done Verifying transaction: done Executing transaction: done (facerecog_env) D:\15_devt\GitHub\Oohr-master>flet --version 0.8.2 ```
Verdict: updating the packages fixed it, i am extremely sorry for any inconvenience caused. thanks a lot for bearing with me.
goyalyashpal commented 11 months ago

Conclusion:

Deliverables:

  1. There is slight scope for improvement in documentation for installation of mamba.

    • docs(mamba_installation): Draw attention to the location of mamba.exe is: <mambaforge>/Scripts/mamba.exe for foolproofing
  2. Can micromamba inspired shell hook be provided as an alternate to mamba init to ease mamba activate for bash via unix shells on windows??

    • feat(mamba_init): Provide eval "$(mamba shell hook --shell bash)" as an alternate to mamba init for unix shells on windows
goyalyashpal commented 11 months ago

one thing i missed in the last hour: (glad i had shared the console logs here :)

  1. the update for flet was done using mamba - that is what fixed the issue. this issue still existed when the package was installed with micromamba. as is still the case with conda-lock via micromamba install conda-lock in the activated (facerecog_env) in bash
    so, maybe there's some issue with the way micromamba installs this kind of stuff.

  2. Also notice the difference in size of repo-data for win-64 fetched by mamba (in logs of "success πŸ˜ƒ") vs micromamba:

# micromamba
conda-forge/noarch                                  13.4MB
conda-forge/win-64                                  18.8MB
# mamba
conda-forge/noarch                                  13.4MB
conda-forge/win-64                                  21.4M

To try and verify this, i uninstalled the mambaforge, and miniforge. micromamba create -f environment.yml to create fresh environment overriding the existing one (729MB download size)

here, flet --version ran fine (i.e. as it was installed with whole environment)

so then i did micromamba install -f requirements-directly-pinned.txt conda-lock <<< n (no) and micromamba install conda-lock <<< y (yes) and conda-lock (i.e. installing conda-lock directly into environment)

now, it didn't show failed to create process. - rather it showed this elaborate traceback:

conda-lock-traceback ```traceback Traceback (most recent call last): File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Scripts\conda-lock-script.py", line 6, in from conda_lock import main File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Lib\site-packages\conda_lock\__init__.py", line 3, in from conda_lock.conda_lock import main File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Lib\site-packages\conda_lock\conda_lock.py", line 49, in from conda_lock.conda_solver import solve_conda File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Lib\site-packages\conda_lock\conda_solver.py", line 20, in from conda_lock.invoke_conda import ( File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Lib\site-packages\conda_lock\invoke_conda.py", line 15, in from conda_lock.models.channel import Channel File "D:\StandalonePrograms\mamba_root\envs\facerecog_env\Lib\site-packages\conda_lock\models\channel.py", line 56, in class CondaUrl(BaseModel): File "pydantic\\main.py", line 186, in pydantic.main.ModelMetaclass.__new__ TypeError: Argument 'bases' has incorrect type (expected list, got tuple) ```
---- Now, if hypothesis about "micromamba install is broken" is right, then doing `mamba install conda-lock` in this environment _should_ fix conda-lock **Update:** nope, no go despite trying with following after adding `conda-lock` in the .txt file: `mamba install --update-all --file requirements-directly-pinned.txt --force-reinstall` (unix umamba activated env)
goyalyashpal commented 11 months ago

closing as not reliably reproduced ever again since.

jjfantini commented 5 months ago

I've run into this issue just now investigating...

Has anyone solved the reason?

When I create a new micromamba environment, the packages that I install say Failed to create process

I think it's a senescent file from an old Miniconda installation. But cant figure out where to fix?

goyalyashpal commented 5 months ago

the packages that I install say Failed to create process

hi! what packageh were u trying to run? i have found an alternate way; maybe that could, at least partially, help u.

jjfantini commented 5 months ago

I am trying to install poetry and Python. I am reinstalling Windows 11, hopefully that solves the issue…go big or go home lmao

sent from humblWorkshop


⬇️⬇️ TRY OUR DATA TOOLS ⬇️⬇️ πŸ“ˆπŸ“Šhumblfinance.ioπŸ“ŠπŸ“ˆ

⬇️⬇️ JOIN OUR SMALL COMMUNITY ⬇️⬇️ Β πŸ““πŸ“–humblblog.comπŸ“–πŸ““

⬇️⬇️ CONTACT ⬇️⬇️ πŸ“§: @. πŸ“§: @. πŸ“±: +1 (307) 278-6561 On Feb 2, 2024 at 2:36β€―AM +0000, goyalyashpal @.***>, wrote:

the packages that I install say Failed to create process hi! what packageh were u trying to run? i have found an alternate way - maybe that could at least partially help u. β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>