收到用户输入后,Windows批处理文件无法继续

我正在尝试执行一个.bat文件以在conda中创建环境,并且正在使用以下脚本:

set HTTPS_Proxy=<some_value>  #will be setting some value
set HTTPS_Proxy=<some_vale>   #will be setting some value
conda create -n SATENV python=3.6 
activate SATENV 
set HTTPS_Proxy=<some_value>  #will be setting some value
set HTTPS_Proxy=<some_vale>   #will be setting some value
pip install -r requirements.txt  
python -m spacy download en 
python -m nltk.downloader stopwords 
conda deactivate 
python -m ipykernel install --user --name SATENV --display-name "SATENV"

在第三行conda create -n SATENV python=3.6中,批处理脚本期望用户输入(是或否)以继续安装新软件包,并且在用户响应后,第三行执行,并且批处理文件停止执行其他行。任何线索都将非常有帮助。

谢谢。

bysjlyl 回答:收到用户输入后,Windows批处理文件无法继续

假设condaactivate是批处理文件:

更改:

conda create -n SATENV python=3.6 
activate SATENV 

收件人:

call conda.bat create -n SATENV python=3.6 -y
call activate.bat SATENV

请注意,我还添加了-y选项,以便在随后的所有提示中回答“是”,并避免等待最终用户这样做。

本文链接:https://www.f2er.com/3144460.html

大家都在问