Updating scikit-learn to latest version with Anaconda environment fails with http error 000
Question:
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:
- cmd
- I go in the script directory D:ProgramDataAnaconda3Scripts
- conda update scikit-learn
it fails with this error message:
ProgramDataAnaconda3Scripts>conda update scikit-learn
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: 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 ?
Answers:
I made it work, so I share the way I did it:
You have to run the conda command from an Anaconda environnement, not directly from the command line.
Waring: it is not recommended to use pip when you have Anaconda installed
-
in windows menu, search Anaconda
-
launch Anaconda Navigator Anaconda3 gui
-
on the left menu, click "environments"
-
next to "base (root)", click on the green arrow/triangle
-
select "Open Terminal"
-
type the command line:
conda install scikit-learn==0.24.1
It worked without error.
First of all, you should have a look at this thread:
- https://github.com/conda/conda/issues/9746#issuecomment-616314792.
You have to copy libcrypto-1_1-x64.*
and libssl-1_1-x64.*
from Anaconda3Librarybin
to Anaconda3DLLs
.
If it doesn’t work, you can try this:
- Open Anaconda Prompt, it will open in this directory:
(base) C:UsersUserName>
- Try pip to install sci-kit-learn:
pip install pip --upgrade
and then pip install -U scikit-learn
Let me know if this works!
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:
- cmd
- I go in the script directory D:ProgramDataAnaconda3Scripts
- conda update scikit-learn
it fails with this error message:
ProgramDataAnaconda3Scripts>conda update scikit-learn
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: 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 ?
I made it work, so I share the way I did it:
You have to run the conda command from an Anaconda environnement, not directly from the command line.
Waring: it is not recommended to use pip when you have Anaconda installed
-
in windows menu, search Anaconda
-
launch Anaconda Navigator Anaconda3 gui
-
on the left menu, click "environments"
-
next to "base (root)", click on the green arrow/triangle
-
select "Open Terminal"
-
type the command line:
conda install scikit-learn==0.24.1
It worked without error.
First of all, you should have a look at this thread:
- https://github.com/conda/conda/issues/9746#issuecomment-616314792.
You have to copylibcrypto-1_1-x64.*
andlibssl-1_1-x64.*
fromAnaconda3Librarybin
toAnaconda3DLLs
.
If it doesn’t work, you can try this:
- Open Anaconda Prompt, it will open in this directory:
(base) C:UsersUserName>
- Try pip to install sci-kit-learn:
pip install pip --upgrade
and thenpip install -U scikit-learn
Let me know if this works!