Error trying to install scikit-Learn

Asked

Viewed 83 times

3

I’m trying to install scikit-Learn via Pip to python 3.9, but in the part that says "Installing build dependencies..." an error occurs every time. I have already installed numpy and scipy, which are prerequisites, and I have even formatted my PC, but it still gives the error. The error message is very big, but these are the initial and final lines, which I believe are the most important:

Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\alfredo\appdata\local\programs\python\python39\python.exe' 'c:\users\alfredo\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Alfredo\AppData\Local\Temp\pip-build-env-rs86gbfh\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation == '"'"'CPython'"'"'' 'numpy==1.14.0; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'CPython'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'scipy>=0.19.1'
       cwd: None

.
.
.

----------------------------------------
  ERROR: Command errored out with exit status 1: 'c:\users\alfredo\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alfredo\\AppData\\Local\\Temp\\pip-install-wn_2dnvm\\numpy_32582bf8a3d04f8fa43ffe9d540c089c\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alfredo\\AppData\\Local\\Temp\\pip-install-wn_2dnvm\\numpy_32582bf8a3d04f8fa43ffe9d540c089c\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alfredo\AppData\Local\Temp\pip-record-_e01fgoh\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Alfredo\AppData\Local\Temp\pip-build-env-rs86gbfh\overlay' --compile --install-headers 'C:\Users\Alfredo\AppData\Local\Temp\pip-build-env-rs86gbfh\overlay\Include\numpy' Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\alfredo\appdata\local\programs\python\python39\python.exe' 'c:\users\alfredo\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Alfredo\AppData\Local\Temp\pip-build-env-rs86gbfh\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation == '"'"'CPython'"'"'' 'numpy==1.14.0; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'CPython'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'scipy>=0.19.1' Check the logs for full command output.
  • 1

    Although sckit-Learn shows that it works on version 3.6 or higher of Python. I believe it is up to 3.8...

  • @Paulomarques was just that. I uninstalled Python 3.9 and installed 3.8 and it worked. Thanks!

1 answer

0

Try to update setuptools

pip install --upgrade setuptools

If it doesn’t work out, send the whole mistake if there’s more.

  • I did this but it still gives the error. The error message is too big and exceeds the character limitation...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.