我在 Windows 10 上嘗試用 Python 撰寫代碼并將變數存盤到環境變數中。
當我執行“設定示例 = 123”時,該命令通過沒有我可以看到的任何問題,但是當我自己輸入“設定”以便我可以看到存盤的內容時,我得到了這個:
PS C:\Users\Abrahim\Desktop\New file> set
cmdlet Set-Variable at command pipeline position 1
Supply values for the following parameters:
Name[0]:
Set-Variable : Cannot bind argument to parameter 'Name' because it is an empty array.
At line:1 char:1
set
~~~
CategoryInfo : InvalidData: (:) [Set-Variable], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyArrayNotAllowed,Microsoft.PowerShell.Commands.SetVariableCommand
我不確定這是否相關,但我看到一些地方建議我必須設定一個環境。如果我只是在那個作業程序中需要它,我是否必須設定它?在我參加的在線課程中,該人只是直接使用 env 并沒有安裝或設定任何東西。這就是為什么我要求確定。
我嘗試了所有的大寫字母以防萬一“SET”、“env”和“ENV”。
PS C:\Users\Abrahim\Desktop\New file> SET
cmdlet Set-Variable at command pipeline position 1
Supply values for the following parameters:
Name[0]:
Set-Variable : Cannot bind argument to parameter 'Name' because it is an empty array.
At line:1 char:1
SET
~~~
CategoryInfo : InvalidData: (:) [Set-Variable], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyArrayNotAllowed,Microsoft.PowerShell.Commands.SetVariableCommand
PS C:\Users\Abrahim\Desktop\New file> env
env : The term 'env' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
env
~~~
CategoryInfo : ObjectNotFound: (env:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Abrahim\Desktop\New file> ENV
ENV : The term 'ENV' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
ENV
~~~
CategoryInfo : ObjectNotFound: (ENV:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
uj5u.com熱心網友回復:
轉到Windows選項卡,CMD然后在命令提示符下鍵入set,然后輸入。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/455280.html
上一篇:SVG圖示不加載
