
Installing on Apple Silicon M1 hardware ¶ Scikit-learn 1.1 and later requires Python 3.8 or newer. Scikit-learn 1.0 supported Python 3.7-3.10. Scikit-learn 0.23 - 0.24 require Python 3.6 or newer. Scikit-learn 0.22 supported Python 3.5-3.8. Scikit-learn 0.21 supported Python 3.5-3.7. Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. Minimum version of Scikit-learn dependencies are listed below along with its Matplotlib and some examples require scikit-image, pandas, or seaborn. Scikit-learn plotting capabilities (i.e., functions start with “plot_”Īnd classes end with “Display”) require Matplotlib. Particular configurations of operating system and hardware (such as Linux on When using pip, please ensure that binary wheels are used,Īnd NumPy and SciPy are not recompiled from source, which can happen when using
MACPORTS PYTHON PIP INSTALL
If you have not installed NumPy or SciPy yet, you can also install these usingĬonda or pip. Prior to running any Python command whenever you start a new terminal session. Note that you should always remember to activate the environment of your choice Package manager of the distribution (apt, dnf, pacman…). In particular under Linux is itĭiscouraged to install pip packages alongside the packages managed by the Version of scikit-learn with pip or conda and its dependencies independently ofĪny previously installed Python packages. Using such an isolated environment makes it possible to install a specific Strongly recommended to use a virtual environment (venv) or a conda environment. Note that in order to avoid potential conflicts with other packages it is opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packagesįor reference see how the Eclipse Liclipse python IDE dialog for setting the PATH looks - there are some more directories you might want to include for a fully specified PYTHONPATH.Python3 -m pip show scikit-learn # to see which version and where scikit-learn is installed python3 -m pip freeze # to see all packages installed in the active virtualenv python3 -c "import sklearn sklearn.show_versions()" python -m pip show scikit-learn # to see which version and where scikit-learn is installed python -m pip freeze # to see all packages installed in the active virtualenv python -c "import sklearn sklearn.show_versions()" python -m pip show scikit-learn # to see which version and where scikit-learn is installed python -m pip freeze # to see all packages installed in the active virtualenv python -c "import sklearn sklearn.show_versions()" python -m pip show scikit-learn # to see which version and where scikit-learn is installed python -m pip freeze # to see all packages installed in the active virtualenv python -c "import sklearn sklearn.show_versions()" conda list scikit-learn # to see which scikit-learn version is installed conda list # to see all packages installed in the active conda environment python -c "import sklearn sklearn.show_versions()" One-Line PYTHONPATH setting in macports: export PYTHONPATH=$(dirname $(sudo port contents python38 | grep site-packages))Īnd we can check the result: echo $PYTHONPATH So it's possible to end up with the one-liner: Gives the desired directory: /opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packages

Since we need the directory modifying the command to: dirname $(sudo port contents python38 | grep site-packages)

With the output: /opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packages/README.txt Applications/MacPorts/Python 3.8/IDLE.app/Contents/PkgInfoĬombining that with fardjad's answer leads to: sudo port contents python38 | grep site-packages Applications/MacPorts/Python 3.8/IDLE.app/Contents/MacOS/Python Applications/MacPorts/Python 3.8/IDLE.app/Contents/MacOS/IDLE Applications/MacPorts/Python 3.8/IDLE.app/Contents/ist

Which lists 7285 lines: Port python38 contains:

I checked my python version python -versionĪnd then tried: sudo port contents python38
