Updating scikit-learn to latest version with Anaconda environment fails with http error 000

2024/7/7 8:02:14

I use Anaconda3 installed on my pc Win10 64bits.

I noticed it runs with an outdated scikit learn version (0.21.3), and I am trying to update it (0.24.1 available on https://repo.anaconda.com/pkgs/main/win-64/)

I do this:

  1. cmd
  2. I go in the script directory D:\ProgramData\Anaconda3\Scripts
  3. conda update scikit-learn

it fails with this error message:

ProgramData\Anaconda3\Scripts>conda update scikit-learn
Collecting package metadata (current_repodata.json): failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.'https://repo.anaconda.com/pkgs/main/win-64'

It is my personal PC, I have access to websites: https://www.anaconda.com and https://repo.anaconda.com/pkgs/main/win-64/ from my webbrowser chrome, without any problem.

So what could be wrong here ? How can I update sucessfully ?

I can download the files from https://repo.anaconda.com by hand if necessary, but how to install it ?

Answer

First of all, you should have a look at this thread:

  1. https://github.com/conda/conda/issues/9746#issuecomment-616314792. You have to copy libcrypto-1_1-x64.* and libssl-1_1-x64.* from Anaconda3\Library\bin to Anaconda3\DLLs.

If it doesn't work, you can try this:

  1. Open Anaconda Prompt, it will open in this directory: (base) C:\Users\UserName>
  2. Try pip to install sci-kit-learn: pip install pip --upgrade and then pip install -U scikit-learn

Let me know if this works!

https://en.xdnf.cn/q/119754.html

Related Q&A

Python RegEx remove new lines (that shouldnt be there)

I got some text extracted and wish to clean it up by RegEx.I have learned basic RegEx but not sure how to build this one:str = this is a line that has been cut. This is a line that should start on a …

Python CSV writer

I have a csv that looks like this:HA-MASTER,CategoryID 38231-S04-A00,14 39790-S10-A03,14 38231-S04-A00,15 39790-S10-A03,15 38231-S04-A00,16 39790-S10-A03,16 38231-S04-A00,17 39790-S10-A03,17 38231-S04-…

How to perform standardization on the data in GridSearchCV?

How to perform standardizing on the data in GridSearchCV?Here is the code. I have no idea on how to do it.import dataset import warnings warnings.filterwarnings("ignore")import pandas as pd …

how to find the permutations of string? python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.Questions asking for code must demonstrate a minimal understanding of the problem being solved. Incl…

Unicode category for commas and quotation marks

I have this helper function that gets rid of control characters in XML text:def remove_control_characters(s): #Remove control characters in XML textt = ""for ch in s:if unicodedata.category(c…

Uppercase every other word in a string using split/join

I have a string: string = "Hello World" That needs changing to: "hello WORLD" Using only split and join in Python. Any help? string = "Hello World" split_str = string.spl…

BeautifulSoup get text from tag searching by Title

Im scrapping a webpage with python that provides different documents and I want to retrieve some information from them. The document gives the information in two ways, theres this one where it gives it…

Subtract from first value in numpy array [duplicate]

This question already has answers here:Numpy modify array in place?(4 answers)Closed 6 years ago.Having numpy array like that:a = np.array([35,2,160,56,120,80,1,1,0,0,1])I want to subtract custom valu…

how to give range of a worksheet as variable

I am having one excel sheet which is used to read the data through python openpyxl...so in my script i have values that are hard coded as ws[E2:AB3] as AB3 is the last entry to be read...but now the sh…

how to remove brackets from these individual elements? [duplicate]

This question already has answers here:How do I make a flat list out of a list of lists?(32 answers)Closed 2 years ago.This post was edited and submitted for review 2 years ago and failed to reopen th…