簡體   English   中英

更新批處理文件中的路徑

[英]Updating the path within a batch file

我正在編寫一個腳本,該腳本安裝活動的python,然后“點安裝”兩個庫:

IF %ARCH%==%tb% msiexec.exe /i Python\ActivePython-2.7.2.5-win32-x86.msi /qb
pip install requests
pip install pyserial

運行此'pip' is not recognized as an internal or external command, ...我得到: 'pip' is not recognized as an internal or external command, ...

但是,如果我在程序完成后拉起Powershell,則pip已添加到我的路徑中,並且列出的命令有效。

所以我的問題是:如何更新批處理文件中的路徑,以便可以在不啟動新進程的情況下使用pip?

您可以嘗試以下方法:

@echo off
set "path=%path%;C:\my path update"

半冒號很重要。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM