我想使用 Anaconda 环境执行 py 文件。我无法打开 Powershell 提示符来发送命令行。您有建议吗?
解决方案,1不起作用:使用命令执行powershell流程:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& 'C:\Users\andre\anaconda3\shell\condabin\conda-hook.ps1' ; conda activate 'C:\Users\andre\anaconda3' "
解决方案2不起作用:执行dos命令流程来执行powershell:
powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& 'C:\Users\andre\anaconda3\shell\condabin\conda-hook.ps1' ; conda activate 'C:\Users\andre\anaconda3' "
我尝试了解决方案1和2,但没有成功。我还在 StackOverflow 中尝试了过去的解决方案。我希望有建议来完成流程并在 Conda 中执行 py 文件。
我的解决方案是从 Automate 执行 shell 命令:
conda info --envs
conda activate envname