2017-02-20 104 views
1

我創建了以下批處理文件:jupyter_nn.bat。 裏面的文件我有:激活虛擬環境並啓動jupyter筆記本全部批處理文件

cd "C:\My_favorite_path" 
activate neuralnets 
jupyter notebook 

所以我們的目標是激活暢達虛擬環境,並開始jupyter筆記本。出於某種原因,這是行不通的。窗口立即關閉。如果我從cmd運行這個批處理文件,它只執行activate neulranets。我已經試過pausepause>nul和其他伏都教舞蹈。有什麼建議麼?這也適用於Windows 7.

回答

3

您需要在激活之前添加CALL。由於activate是另一批腳本,除非你的CALL它,整個過程將退出。在這裏看到更多的解釋:How to run multiple .BAT files within a .BAT file

cd "C:\My_favorite_path" 
CALL activate neuralnets 
jupyter notebook 

(您可能還需要CALL的Jupyter筆記本)

+0

非常感謝您!不需要'CALL' Jupyter Notebook。 – user1700890

相關問題