Tag Archives: Powershell.

How to Solve Vscode terminal error (ts -v)

Solution: (test available)
run PowerShell as an administrator and execute the command set-ExecutionPolicy RemoteSigned to change the execution policy of PowerShell to RemoteSigned

1. Win + X: select windows PowerShell to open the shell
2. Run set-ExecutionPolicy RemoteSigned command and enter y
3. Run get-ExecutionPolicy command to see that the execution policy of the script has been changed to RemoteSigned
4. Return to the vscode terminal and enter the command TSC – V to stop reporting errors, TS files can also be compiled

An error commandnotfounderror (to initialize your shell) is reported when activating the virtual environment

Error in activating virtual environment

PS E:\projects\Text2Scene_v3> conda activate base

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - cmd.exe
  - fish
  - tcsh
  - xonsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

Windows10 + vscode
after all the information found on the Internet is used, it is found that it is useless
later, I found out why the previous one was PS (base) or not. As a result, I changed the terminal from power shell to CMD emmmmm~~

Mistakes vary from person to person. It may take a lot of unnecessary time to solve them, but patience will always solve them, rush
If I can’t solve this problem, go and see someone else’s~~