Tag Archives: conda

[Solved] conda activates the virtual environment error: Invoke-Expression

Insert picture description here
I’ll borrow the picture of someone else’s problem, my problem is more or less the same, I got an error when activating the conda virtual environment
I checked the system environment variable Path and found that the python path where the error directory is located is wrong, after deleting it, I activated the environment normally.

[Solved] ProxyError: Conda cannot proceed due to an error in your proxy configuration.

ProxyError: Conda cannot proceed due to an error in your proxy configuration.

0. Problem reporting error

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

The following errors are reported when installing pytorch:

ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.

The problem lies in agency

1. Solutions

(1) View current terminal agent

env | grep -i "_PROXY"

(2) Delete agents in turn

unset HTTP_PROXY
unset https_proxy
unset http_proxy
unset no_proxy
unset NO_PROXY

3. Whether the verification is successful

Enter again

env | grep -i "_PROXY"

then enter the following:
env. grep -i "PROXY"

How to Solve RemoveError: setuptools is a dependency of conda and cannot be removed from conda

conda remove c> create : conda create : conda create : conda remove : conda create :

RemoveError: ‘setuptools’ is a dependency of Conda and cannot be removed from Conda

I checked a bunch of blogs and they all suggested updating Conda.
conda update --force-reinstall conda
The problem came again. After the command was entered, the process kept spinning in circles, and the terminal did not show any idea of updating. Angry dead an !!!!
I fat tiger not letter can not treat you!!
Solution:
enter the command: gedit. Condarc
the HTTPS instead of HTTP from the original image of the source can be updated again
I will be the original. Condarc file to the following form, for reference only.

ssl_verify: true
channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true

conda update --force-reinstall conda Be able to normal use after
conda remove or conda create command

RemoveError: ‘requests‘ is a dependency of conda and cannot be removed from conda‘s operating env

1. The question is:

removeError: ‘requests’ is a dependency of Conda and cannot be removed from Conda’s operating environment.
removeError: ‘setup_tools’ is a dependency of CONDA and cannot be removed from CONDA’s operating environment.
2. Solutions
Force Conda to be updated before installation

conda update --force conda

3. More related questions
https://github.com/conda/conda/issues/8149

RemoveError: ‘requests’ is a dependency of conda and cannot be removed from conda’s operating enviro

An error occurred during installation of conda
RemoveError: ‘requests’ is a dependency of conda and cannot be removed from conda’s operating environment.
 
This error occurs because the ‘Requests’ package was installed with PIP and is triggered if you install other packages using CANDA.
Solutions:
1, Use PIP uninstall packagename to uninstall the package, it is not recommended to use this, it will cause other errors.
2. Use PIP packagename to install the package
Good luck
Reference:
https://blog.csdn.net/weixin_40405758/article/details/88094405

Solution of CONDA (PIP) bad interpreter

because of the change of server, I moved the conda environment used in the original server directly to the new server. As a result, the “Conda (PIP) bad Interpreter” error appeared when using the conda(PIP) command on the new server. The solution:

  • enter which PIP view PIP path
  • enter which python view python path
  • use vim to open the PIP path (or python path) that you have just obtained. Change the path in the first line of the code to be the same as the PIP path.