why doesnt this work? : ""(base) PS C:\Users\bower>…
- User
why doesnt this work? : ""(base) PS C:\Users\bower> ollama_host=https://afb2-34-87-36-160.ngrok-free.app/ ollama_host=https://afb2-34-87-36-160.ngrok-free.app/ : The term 'ollama_host=https://afb2-34-87-36-160.ngrok-free.app/' 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
- ollama_host=https://afb2-34-87-36-160.ngrok-free.app/
-
code
+ CategoryInfo : ObjectNotFound: (ollama_host=htt...ngrok-free.app/:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
(base) PS C:\Users\bower> ""
- Assistant
The error you're encountering is due to trying to set environment variable syntax meant for Unix-like operating systems (such as Linux or macOS) within PowerShell, which requires a different syntax. In Unix-like systems, you would indeed use
NAME=valueto set an environment variable from the command line. However, PowerShell, which is the shell you're using as indicated byPSin your prompt, requires a different syntax for setting environment variables.To set an environment variable in PowerShell, you should use the
$env:VariableName = "value"syntax. So, in your case, you would set theollama_hostenvironment variable like this:powershell$env:ollama_host = "https://afb2-34-87-36-160.ngrok-free.app/"After running this command,
ollama_hostshould be correctly set as an environment variable in your PowerShell session. Remember that this will only set the variable for the duration of the current session. If you close and reopen the PowerShell window, or start a new session, you'll have to set the variable again.