I'm on Windows 10 trying to code in Python and store variables into environment variables.
When I do 'set example=123', the command goes through with no issues that i can see, but when i go to type 'set' on its own so I can see what is stored, I get this:
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
I'm not sure if this is relevant, but I see some places suggesting that I have to set an environment up. Do I have to set it up if I just need it in that work process? In the online course that I'm in, the person just used env directly and didn't install or set up anything. That's why I'm asking to make sure.
I tried all caps just in case 'SET', 'env', and '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
CodePudding user response:
Go to the windows tab and type CMD
then in the command prompt type set
then enter.