In the CONDA environment using vs code, running the program will report the following problems
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 - zsh - powershell See 'conda init --help' for more information and options. IMPORTANT: You may need to close and restart your shell after running 'conda init'.
After online search, the solution is as follows. Method 2 can be used for pro test:
Use the anaconda navigator or Anaconda PowerShell prompt provided by Anaconda to enter the environment, or enter CONDA Bat activate “environment path”, such as CONDA batactivate”D:\Anaconda3\envs\test”
Open the administrator power shell, modify the execution policy, execute: get executionpolicy, reply restricted, indicating that the status is prohibited
Restricted – default setting, no scripts are allowed to run
allsigned – only scripts signed by digital certificates can be run
remotesigned – local scripts do not need digital signatures, but scripts downloaded from the network must have digital signatures
unrestricted – all scripts are allowed to run
Execute: set executionpolicy remotesigned
Input: CONDA init
At this time, the configuration file profile will be generated under C:\users\XXX\documents\windowspowershell ps1
After restarting the power shell or vs code, it will enter the base environment of CONDA by default
Delete profile ps1.
According to personal conditions, execute the set executionpolicy restricted policy and change it back to restricted.
- [Solved] Failed environment install leads to “unable to create process using“ error
- [Solved] MAC terminal Use ‘CONDA activate’ and ‘CONDA install package_ Error reported by name’ Error
- [Solved] Conda Upgrade Error: PackageNotInstalledError: Package is not installed in prefix.
- [How to Solve] ERROR: Input: conda activate xxx
- ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
- [Solved] conda install DBUtils Error: To search for alternate channels that may provide the conda package you’re looking for
- VScode import numpy Error: DLL load failed [How to Solve]
- The PIP installation package was successful but the import failed
- [Solved] Error when vscode activates Python virtual environment
- Conda Install Library Error: failed with initial frozen solve. Retrying with flexible solve.
- Python Pandas Error: No module named ‘openpyxl‘
- [Solved] ERROR: No matching distribution found for torch-cluster==x.x.x
- [Solved] Conda install Error: An HTTP error occurred when trying to retrieve this URL. HTTP errors are often…
- [Solved] Pycharm Use pip Error: Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present
- visdom Install and Run Error: raise Connectionerror [How to Solve]
- Pytorch: How to Handle error warning conda.gateways.disk.delete:unlink_or_rename_to_trash(140)
- [Solved] Jupyter Notebook Start Error: Fatal error in launcher: Unable to create process using
- How to Solve Error handling after upgrade pip of Anaconda
- Pycharm error: original error was: DLL load failed while importing _multiarray _Umath: the specified module could not be found
- [Mac M1] How to Solve import wordcloud Error: ModuleNotFoundError: No module named ‘wordcloud‘