anaconda, python uninstall and reinstall and anaconda–443

Uninstall and reinstall anaconda and python

  • 1. Conda creation environment error handling Collecting package etadata (current_repodata.json): DEBUG:urllib3
      • question:
      • Solution one:
      • Solution two:
  • 2. How to uninstall anaconda3 cleanly
      • 1. Install Anaconda-Clean package
      • 2. Open Anaconda Prompt and enter the command line:
      • 3. Then enter the command line to uninstall:
      • 4. For anaconda3, directly run Uninstall-Anaconda3.exe in its installation directory.
  • 3. Completely uninstall anaconda tutorial
      • How to completely uninstall anaconda
      • Preface (to see the uninstallation process, skip to the second part)
      • 1. Some problems I encountered
          • first question
          • second question
          • The third question
          • The fourth question
      • 2. Uninstallation process
          • 1. Check the environment
          • 2. Download the anaocnda-clean package
          • 3. Enter the following command
          • 4. Run the uninstaller
          • 5. Delete related files
          • Summarize
  • 4. Problems with uninstalling and reinstalling Anaconda
      • 1. Cause of the problem
      • 2. Uninstallation process
          • 1. Open Anaconda Prompt, enter the code to view all virtual environments
          • 2. Uninstall Anaconda through Geek software
          • 3. Delete Python configuration
          • 4. Check: Confirm that Python has been deleted
      • 3. Reinstall:
      • 4. Summary
  • 5. Complete tutorial on uninstalling and reinstalling Python
    • Remove all existing python
      • Method 1: If the corresponding installation package is still there, double-click to run the installation package, and the following page will appear:
      • Method 2: Find the application with python in Applications and Functions in Settings:
      • Method 3: Uninstall the application with python in the control panel
    • Delete all related files and folders of python
      • If you know the location of the folder, find it and right-click to delete it.
      • Confirm whether python is deleted cleanly
      • Then enter where python, two situations will occur:
    • Install python tutorial
  • 6. The tragedy of uninstalling and reinstalling anaconda
    • Here comes the point
    • inspiration

1. Conda creation environment error handling Collecting package etadata (current_repodata.json): DEBUG:urllib3

Question:

I recently used the conda environment. Due to frequent errors, I reinstalled conda out of anger. However, after reinstalling, an error occurred when creating the environment. The following error message was reported.

(base) C:\Users\admin>conda create --name du python=3.10
Collecting package metadata (current_repodata.json): / DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mirrors.tuna.tsinghua.edu.cn:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mirrors.tuna.tsinghua.edu.cn:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mirrors.tuna.tsinghua.edu.cn:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mirrors.tuna.tsinghua.edu.cn:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mirrors.tuna.tsinghua.edu.cn:443ction (1): 400 The plain HTTP request was sent to HTTPS port

Solution 1:

I saw several solutions on the Internet, and the final one that proved effective is that when conda creates an environment, it will automatically download the package file from the default source. These configurations are saved in windows. In code>c:\users\xxxx\.condarc file, xxx is your username, mine is in c:\users \admin below. If there is no default channels in it, or it is usually from Tsinghua University just after installation, then there will be connection problems. Although it does not affect the environment creation, it will affect the viewing. Therefore, using Alibaba’s source as the default can solve this problem. My file was modified as follows and after restarting, the problem was solved.

channels:
  -defaults
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.aliyun.com/anaconda/pkgs/msys2

ssl_verify: false
show_channel_urls: true

Note: The mirror source is missing / at the end

Solution 2:

emm… I encountered the same problem. I checked online because there was a problem with the [3.26.0] version of the [conda-build] package. I used conda install - c conda-forge conda-build was solved by upgrading to 3.26.1. I heard that using conda install conda-build=3.25.0 can also be used to return to 3.25.0.

2. How to uninstall anaconda3 cleanly

I kept getting various errors when running code recently. Because I had uninstalled anaconda once before, I guessed that it might not be uninstalled cleanly, so I uninstalled it again. In order to prevent the uninstallation from being clean again, I searched for a long time and finally downloaded it from the official website. I found a way to uninstall it cleanly.

1. Install Anaconda-Clean package

2. Open Anaconda Prompt and enter the command line:

conda install anaconda-clean

3. Then enter the command line to uninstall:

anaconda-clean --yes

4. For anaconda3, directly run Uninstall-Anaconda3.exe in its installation directory.

3. Completely uninstall anaconda tutorial

How to completely uninstall anaconda

-(Nonsense preface, just pass) This article is mainly about some problems that I have recently encountered when using anaconda. After being unable to solve them, I thought of the most original and most effective method, which is to uninstall and reinstall. . But unfortunately, uninstalling anaconda is not that simple. The same problem may appear again after reinstalling. Here I also refer to articles written by others. Although the overall process is roughly the same, in other articles I see that there are still some details that have not been explained. This is why I have tried many times and failed to uninstall it completely.

Foreword (skip to the second part to see the uninstallation process)

This article is mainly about writing about some problems that I have recently encountered when using anaconda. After being unable to solve them, I thought of the most original and effective method, which is to uninstall and reinstall. But unfortunately, uninstalling anaconda is not that simple. The same problem may appear again after reinstalling. Here I also refer to articles written by others. Although the overall process is roughly the same, there are still some details that are not seen in other articles. To put it bluntly, this is also the reason why I have tried many times and failed to uninstall it completely.

1. Some problems I encountered

Recently I was studying Federated Learning and I found some frameworks online. I didn’t know where the problem occurred during installation, which caused a lot of problems when I installed the package later.

First question

This sentence appears when installing the package

Defaulting to user installation because normal site-packages is not writeable

This was a problem that occurred after uninstalling and reinstalling. I originally installed anaconda on the d drive. Later, when I used the command to download the package in the terminal, the package I downloaded was not in the specified d drive, but went to the c drive.

Second question

Another problem I encountered when downloading the federated learning framework. The error message I was prompted was that I did not install Microsoft Visual C++ 14.0. This is easier to solve. Follow the URL below. Just download the appropriate software.

The third question

This problem occurs in navigator. Generally, after installing anaconda, the default environment is only one (base). I set up other environments when installing the federated learning framework. Then the problem came. When I deleted the environment directly in navigator, I was prompted that I could not delete it. Later, I also found a way to delete it through instructions, and it was successful.

The fourth question

This is quite interesting. I had vpn installed at the time, but when I was installing the package, a bunch of red letters suddenly popped up. Anyway, it couldn’t be installed. The final reason was that vpn was turned off. After that you can install the package normally.

2. Uninstallation process

1. Check the environment

First, open prompt and be sure to run it as an administrator. I didn’t have it at the beginning, which caused problems later when installing anaconda-clean


After opening it, run the following command, and your anaconda environment information will be displayed.

conda info --envs


This is the result after I reinstalled it later. Before this, I had two environments. After I uninstalled and reinstalled, two environments still appeared. This shows that the uninstallation is still incomplete. After that, I deleted the environment I created first and used the following command (just to mention here, if this step is omitted, it seems that it should be possible to follow the subsequent steps, because it still appears after I reinstalled it. The two environments may be because I did not complete all the subsequent steps)

conda remove -n your_env_name (virtual environment name) --all
2. Download the anaocnda-clean package
conda install -c anaconda anaconda-clean
3. Enter the following command
anaconda-clean --yes

Executing this command will generate a backup file, which can be deleted later.

4. Run the uninstaller

Find the uninstaller icon in your installation path, then right-click and open administrator mode to uninstall directly.

5. Delete related files

In the previous step, only the files in the installation path were deleted. Some other files have not yet been deleted and must be deleted as well, including the backup file generated in the fourth step, and other related anaconda file, here you can directly search for anaconda in the search box, and then delete all related files.
Finally, you can try to clean up the registry. I’m not sure if it will help. I saw some people on the Internet doing this, so I’d better do it to be on the safe side.

Summary

At this point, the uninstallation of anaconda is complete. If you install it again later, it will be completely new. I wrote this post after summarizing each article. There are only a few core steps for uninstallation, but sometimes there are some other minor problems. After working on it for a day, I can finally install the federated learning framework with peace of mind. I hope the installation can be completed smoothly this time.

4. Problems with uninstalling and reinstalling Anaconda

1. Cause of the problem

Today suddenly all the pandas libraries of Python cannot be used, and an error message is reported: AttributeError: module pandas’ has no attribute to_excel’. It worked well before. I searched for related solutions, but couldn’t find the empty package and occupied keywords used to name the .py file. After pip uninstall, it still failed. If it cannot be solved, reinstall Anaconda decisively and delete the relevant configuration of Python.

2. Uninstallation process

1. Open Anaconda Prompt and enter the code to view all virtual environments
conda info --envs

Delete after viewing all virtual environments

conda remove -n your_env_name (virtual environment name) --all
2. Uninstall Anaconda through Geek software

3. Delete Python configuration

Delete all files in the following paths:

  • C:\Users\yourusername\AppData\Local\Microsoft\WindowsApps
  • C:\Program Files
  • C:\Program Files (x86)

There may be other Python configuration files, which can be deleted through the Everything software. The observation is usually in the C drive, and may be files starting with ., which can be deleted like the following.

4. Check: Confirm that Python has been deleted

1.win + r open cmd and enter python. If an error is reported, it will be successful.

2. Enter where python. If an error is reported, it will be successful. If there are still paths, just delete the files in these paths.

5. Delete environment variables

Delete the Python-related environment variables in the path

3. Reinstall:

You can directly download the corresponding version from the Anaconda official website and install it.

4. Summary

1. Use conda well to manage dependent environments, create more virtual environments, and reduce incompatibility issues with dependent libraries.

2. When you find that version matching cannot be solved or other very odd issues are found, the easiest way is to reinstall.

5. Complete tutorial on uninstalling and reinstalling Python

Delete all existing python

Method 1: If the corresponding installation package is still there, double-click to run the installation package, and the following page will appear:

Click on the third option Uninstall

Method 2: Find the application with python in Applications and Functions in Settings:

Settings -> App -> Installed apps

Find all applications with python

Click uninstall in “…”

Method 3: Uninstall python applications from the control panel

Press Win + R -> Enter control -> Click OK

Click to uninstall a program


Find all apps with python

Right click to uninstall uninstall

Delete all related files and folders of python

If you know the location of the folder, find it and right-click to delete it

It may be placed in your default path. You can check the following three types on your own computer. If not, it may have been deleted when completing the above uninstall steps. Don’t panic~

  • C:\Users\yourusername\AppData\Local\Microsoft\WindowsApps
  • C:\Program Files
  • C:\Program Files (x86)

Confirm whether python has been deleted

Press Win + R -> enter cmd -> click OK OK

Enter python (if an error message is reported, it proves that the uninstallation is completed)

Enter where python again, two situations will occur:

Situation 1: Error reported, uninstallation successful! ! !

Situation 2: A path appears, similar to the picture below or C:\Users\your username\AppData\Local\Microsoft\WindowsApps

Go to this path and you will find that there is also a python.exe file. If you right-click and delete it directly, an error box may appear. Even restarting will not help. Don’t worry, the solution is as follows:

Press Win + R -> enter cmd -> click OK OK

Enter del /f/s/q just the path, as shown in the figure:

Enter where python again to see if an error is reported. The error indicates that the deletion was successful!

Installation python tutorial

Go to the python official website to download the installation package: Welcome to Python.org

Click the Downloads button


Click the Windows button

It is recommended that you download the latest version. Old versions will have many problems, and make sure your computer is 64-bit or 32-bit. Nowadays, most laptops are 64-bit, but to be on the safe side, you should check your computer configuration. For example, I want Download version 3.10.9 so choose:

Download will start in the upper right corner

After downloading, go to your Downloads folder and double-click the installation package you just downloaded.

If a question box pops up at this moment, just click yes:
Because python is already installed on my computer, I will continue to update after the installation tutorial . If you have any questions, please call me like crazy

6. The tragedy of uninstalling and reinstalling anaconda

After experiencing an extremely desperate day, I finally successfully completed the uninstallation and reinstallation of anaconda at the last moment of my willpower. It can be said that this day was very desperate.

In the morning, I was happily preparing to download the pytorch library for learning. However, I did not use the virtual environment when updating the dependent libraries. As a result, anaconda crashed, and then I didn’t know what the world was like. I uninstalled anaconda. When I failed to reinstall it for the first time, I knew that things were not simple. Then I searched Zhihu on my blog and saw that many people had fallen into this trap, and no one could give a clear explanation. explain. Then I started the iterative process of uninstalling and reinstalling every day.

Here is a very important conclusion to remind myself and everyone I see: You must develop the habit of using virtual environments.

When you read my article, I believe you have also encountered the same tragedy. Here I will talk about the entire process of my success. Because I have noticed all the possible mistakes, which step played a key role? I am not sure as well.

I believe you have seen most of the methods at this point, so I will not add pictures and detailed instructions to save trouble. I believe you also know what I am talking about.

Here comes the point

1. Execute the uninstaller in anaconda. (Because I was afraid that there would be a virtual environment or some relationship between pycharm and anaconda, I uninstalled pycharm while uninstalling anaconda , it is best to use forced uninstall.)
2. Use software such as 360 or Software Manager to clean up the extra registry and delete it.

3. Restart the computer.
4. Perform step 2 again to clean the registry.
5. Go to the official website to download the latest version of anaconda.exe.
6. Run the .exe file as an administrator. Things to note during the process: Do not automatically configure environment variables; change the download directory to a shorter absolute path, such as D:/anaconda.
7. Manually configure the environment variables. After completion, execute conda list on the command line interface to see if the installed packages are listed.

Inspiration

1. No matter what you do, you must develop good habits, don’t be afraid of trouble, and anaconda must use a virtual environment.
2. Don’t use the download package tutorials on the Internet casually. If the same method is used on you, it may be a devastating disaster, so be cautious.

Change yourself, change your life

Conda creation environment error handling Collecting package etadata (current_repodata.json): DEBUG:urllib3

Seven Seconds of Memory

How to uninstall anaconda3 cleanly

A_lany

Tutorial on completely uninstalling anaconda

SparkyWen

Anaconda uninstallation and reinstallation problem

Bboony

Complete tutorial on uninstalling and reinstalling Python

hwblittlebird

The tragedy of reinstalling after uninstalling anaconda