Home:ALL Converter>How to activate linux conda and run python script from Windows Powershell

How to activate linux conda and run python script from Windows Powershell

Ask Time:2022-12-16T02:15:27         Author:Mavershang

Json Formatter

I installed wsl ubuntu, setup a conda env, and run a python script without problem. enter image description here

Now I tried to integrate it into my pipeline and run this command through PowerShell in Windows with

wsl.exe python /mnt/x/projects/EpiMiner/scEpilock/code/utils/e04_variant_impact.py --cell TLymphocyte1_CD8+ --snp /mnt/x/projects/EpiMiner/scEpilock/snp.txt --path /mnt/x/projects/EpiMiner/atac --out /mnt/x/users/shangl02/Test

it failed since the python used here was not the wsl ubuntu conda python (I have trouble to phrase it nicely). So I guess my question is how to activate linux conda env and run python script from powershell in windows.

Author:Mavershang,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74815872/how-to-activate-linux-conda-and-run-python-script-from-windows-powershell
yy