You have 3 conda download options:
Creating a Conda Environment. In Windows you can search for anaconda prompt in the Window search bar and in Mac OS simply find the terminal by searching for terminal in the finder. Installing Anaconda on Mac OS X Anaconda is a package manager, an environment manager, and Python distribution that contains a collection of many open source packages. An installation of Anaconda comes with many packages such as numpy, scikit-learn, scipy, and pandas preinstalled and is also the recommended way to install Jupyter Notebooks.
Conda Download Package
- Download Anaconda---free.
- Download Miniconda---free.
- Purchase Anaconda Enterprise.
To directly install a conda package from your local computer, run: conda install / package - path / package - filename. Bz2 Conda installs packages into the anaconda/pkgs directory. The Jupyter Notebook is a web-based interactive computing platform. The notebook combines live code, equations, narrative text, visualizations, interactive dashboards and other media. There is now a fix from anaconda. Another key change since the last release is that Apple released macOS version 10.15 – Catalina. Unfortunately, this was a breaking release for previous versions of Anaconda that used the pkg installer.
You can download any of these 3 options with legacy Python 2.7 orcurrent Python 3.
You can also choose a version with a GUI or a command lineinstaller.
Tip
If you are unsure which option to download, choose themost recent version of Anaconda3, which includes Python 3.7.If you are on Windows or macOS, choose the version with theGUI installer.
Choose Anaconda if you:
- Are new to conda or Python.
- Like the convenience of having Python and over 1,500 scientificpackages automatically installed at once.
- Have the time and disk space---a few minutes and 3 GB.
- Do not want to individually install each of the packages youwant to use.
Choose Miniconda if you:
- Do not mind installing each of the packages you want to useindividually.
- Do not have time or disk space to install over 1,500 packages atonce.
- Want fast access to Python and the conda commands and you wishto sort out the other programs later.
- Whether you use Anaconda or Miniconda, select the most recentversion.
- Select an older version from the archive only if you are testingor need an older version for a specific purpose.
- To use conda on Windows XP, select Anaconda 2.3.0 and seeUsing conda on Windows XP with or without a proxy.
Both GUI and command line installers are available for Windows,macOS, and Linux:
- If you do not wish to enter commands in a terminal window,choose the GUI installer.
- If GUIs slow you down, choose the command line version.
- The last version of Python 2 is 2.7, which is included withAnaconda and Miniconda.
- The newest stable version of Python is 3.7, which is includedwith Anaconda3 and Miniconda3.
- You can easily set up additional versions of Python such as 3.5by downloading any version and creating a new environment withjust a few clicks. See Getting started with conda.
SHA-256 checksums are available forMiniconda andAnaconda.We do not recommend using MD5 verification as SHA-256 is more secure.
Download the installer file and before installing verify it as follows:
![Conda Conda](/uploads/1/1/7/7/117777800/100816943.jpg)
- Windows:
- If you have PowerShell V4 or later:Open a PowerShell console and verify the file as follows:
- If you don't have PowerShell V4 or later:Use the free online verifier toolon the Microsoft website.
- Download the file and extract it.
- Open a Command Prompt window.
- Navigate to the file.
- Run the following command:
- macOS: In iTerm or a terminal window enter
shasum-a256filename
. - Linux: In a terminal window enter
sha256sumfilename
.
There are different ways to install scikit-learn:
- Install the latest official release. Thisis the best approach for most users. It will provide a stable versionand pre-built packages are available for most platforms.
- Install the version of scikit-learn provided by youroperating system or Python distribution.This is a quick option for those who have operating systems or Pythondistributions that distribute scikit-learn.It might not provide the latest release version.
- Building the package from source. This is best for users who want thelatest-and-greatest features and aren’t afraid of runningbrand-new code. This is also needed for users who wish to contribute to theproject.
Installing the latest release¶
Operating System![Download Download](/uploads/1/1/7/7/117777800/558229258.png)
Install the 64bit version of Python 3, for instance from https://www.python.org.Install Python 3 using homebrew (
brew install python
) or by manually installing the package from https://www.python.org.Install python3 and python3-pip using the package manager of the Linux Distribution.Install conda (no administrator permission required).Then run:
In order to check your installation you can use
Note that in order to avoid potential conflicts with other packages it isstrongly recommended to use a virtual environment, e.g. python3
virtualenv
(see python3 virtualenv documentation) or conda environments.Using an isolated environment makes possible to install a specific version ofscikit-learn and its dependencies independently of any previously installedPython packages.In particular under Linux is it discouraged to install pip packages alongsidethe packages managed by the package manager of the distribution(apt, dnf, pacman…).
Note that you should always remember to activate the environment of your choiceprior to running any Python command whenever you start a new terminal session.
If you have not installed NumPy or SciPy yet, you can also install these usingconda or pip. When using pip, please ensure that binary wheels are used,and NumPy and SciPy are not recompiled from source, which can happen when usingparticular configurations of operating system and hardware (such as Linux ona Raspberry Pi).
If you must install scikit-learn and its dependencies with pip, you can installit as
scikit-learn[alldeps]
.Scikit-learn plotting capabilities (i.e., functions start with “plot_”and classes end with “Display”) require Matplotlib (>= 2.1.1). For running theexamples Matplotlib >= 2.1.1 is required. A few examples requirescikit-image >= 0.13, a few examples require pandas >= 0.18.0, some examplesrequire seaborn >= 0.9.0.
Warning
Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4.Scikit-learn 0.21 supported Python 3.5-3.7.Scikit-learn 0.22 supported Python 3.5-3.8.Scikit-learn now requires Python 3.6 or newer.
Note
For installing on PyPy, PyPy3-v5.10+, Numpy 1.14.0+, and scipy 1.1.0+are required.
Third party distributions of scikit-learn¶
Some third-party distributions provide versions ofscikit-learn integrated with their package-management systems.
These can make installation and upgrading much easier for users sincethe integration includes the ability to automatically installdependencies (numpy, scipy) that scikit-learn requires.
The following is an incomplete list of OS and python distributionsthat provide their own version of scikit-learn.
Arch Linux¶
Arch Linux’s package is provided through the official repositories as
python-scikit-learn
for Python.It can be installed by typing the following command:Debian/Ubuntu¶
The Debian/Ubuntu package is splitted in three different packages called
python3-sklearn
(python modules), python3-sklearn-lib
(low-levelimplementations and bindings), python3-sklearn-doc
(documentation).Only the Python 3 version is available in the Debian Buster (the more recentDebian distribution).Packages can be installed using apt-get
:Fedora¶
The Fedora package is called
python3-scikit-learn
for the python 3 version,the only one available in Fedora30.It can be installed using dnf
:Conda Download Mirror
NetBSD¶
scikit-learn is available via pkgsrc-wip:
MacPorts for Mac OSX¶
Conda Download Package For Offline Install
The MacPorts package is named
py<XY>-scikits-learn
,where XY
denotes the Python version.It can be installed by typing the followingcommand:Canopy and Anaconda for all supported platforms¶
Canopy and Anaconda both ship a recentversion of scikit-learn, in addition to a large set of scientific pythonlibrary for Windows, Mac OSX and Linux.
Anaconda offers scikit-learn as part of its free distribution.
Intel conda channel¶
Intel maintains a dedicated conda channel that ships scikit-learn:
This version of scikit-learn comes with alternative solvers for some commonestimators. Those solvers come from the DAAL C++ library and are optimized formulti-core Intel CPUs.
Note that those solvers are not enabled by default, please refer to thedaal4py documentationfor more details.
Compatibility with the standard scikit-learn solvers is checked by running thefull scikit-learn test suite via automated continuous integration as reportedon https://github.com/IntelPython/daal4py.
WinPython for Windows¶
The WinPython project distributesscikit-learn as an additional plugin.
Troubleshooting¶
Error caused by file path length limit on Windows¶
It can happen that pip fails to install packages when reaching the default pathsize limit of Windows if Python is installed in a nested location such as the
AppData
folder structure under the user home directory, for instance:In this case it is possible to lift that limit in the Windows registry byusing the
regedit
tool:- Type “regedit” in the Windows start menu to launch
regedit
. - Go to the
ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem
key. - Edit the value of the
LongPathsEnabled
property of that key and setit to 1. - Reinstall scikit-learn (ignoring the previous broken installation):