SCIKIT learn failure in mac - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: SCIKIT learn failure in mac (/thread-22867.html) |
SCIKIT learn failure in mac - Perja11 - Nov-30-2019 Hello While installing SCIKIT-LEARN on MAC it failed Could someone please help on what i need to be looking. Jags-MacBook-Air:~ jag$ pip3 install scikit-learn Collecting scikit-learn Downloading https://files.pythonhosted.org/packages/1e/ce/9d8c88e68af0a5b5c5d78d8d2b7bcadfd45e1d6afc863ccb9aee30765b06/scikit-learn-0.21.3.tar.gz (12.2MB) |████████████████████████████████| 12.2MB 1.4MB/s Requirement already satisfied: numpy>=1.11.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from scikit-learn) (1.17.4) Requirement already satisfied: scipy>=0.17.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from scikit-learn) (1.3.3) Collecting joblib>=0.11 (from scikit-learn) Downloading https://files.pythonhosted.org/packages/8f/42/155696f85f344c066e17af287359c9786b436b1bf86029bb3411283274f3/joblib-0.14.0-py2.py3-none-any.whl (294kB) |████████████████████████████████| 296kB 979kB/s Installing collected packages: joblib, scikit-learn Running setup.py install for scikit-learn ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py'"'"'; __file__='"'"'/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-record-fcqytin5/install-record.txt --single-version-externally-managed --compile cwd: /private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/ Complete output (28 lines): Partial import of sklearn during the build process. Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py", line 290, in <module> setup_package() File "/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py", line 286, in setup_package setup(**metadata) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/core.py", line 137, in setup config = configuration() File "/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py", line 174, in configuration config.add_subpackage('sklearn') File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 1033, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 999, in get_subpackage config = self._get_configuration_from_setup_py( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "sklearn/setup.py", line 62, in configuration config.add_subpackage('utils') File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 1033, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 999, in get_subpackage config = self._get_configuration_from_setup_py( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "sklearn/utils/setup.py", line 8, in configuration from Cython import Tempita ModuleNotFoundError: No module named 'Cython' ---------------------------------------- ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py'"'"'; __file__='"'"'/private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-install-1bwoznca/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_4/hxl9577j27z87t2b7b516jv40000gn/T/pip-record-fcqytin5/install-record.txt --single-version-externally-managed --compile Check the logs for full command output RE: SCIKIT learn failure in mac - snippsat - Nov-30-2019 Try: pip3 install --upgrade cythonAlso try in a virtual environment,it's build into Python now trough venv. # Make python3 -m venv sci_env # Cd in cd sci_env # Activate source bin/activate # Install (sci_env) mint@mint $ pip3 install cython pip3 install scikit-learnI have seen this message a couple of time now, it can have to do with 3.8 and that some 3-party lib that have to do a fix for 3.8. |