0

Al instalar pip install sklearn o pip install scikit-learn a traves de cmd me sale el siguiente error:

ERROR: Command errored out with exit status 1:
 command: 'c:\users\kevvelas\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\KEVVELAS\\AppData\\Local\\Temp\\pip-install-1e5i5bj9\\scikit-learn\\setup.py'"'"'; __file__='"'"'C:\\Users\\KEVVELAS\\AppData\\Local\\Temp\\pip-install-1e5i5bj9\\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 'C:\Users\KEVVELAS\AppData\Local\Temp\pip-record-8rc0qj21\install-record.txt' --single-version-externally-managed --compile
          cwd: C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\
Complete output (37 lines):
Partial import of sklearn during the build process.
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\setup.py", line 290, in <module>
    setup_package()
  File "C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\setup.py", line 286, in setup_package
    setup(**metadata)
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\numpy\distutils\core.py", line 137, in setup
    config = configuration()
  File "C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\setup.py", line 174, in configuration
    config.add_subpackage('sklearn')
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\numpy\distutils\misc_util.py", line 1033, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\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 76, in configuration
    maybe_cythonize_extensions(top_path, config)
  File "C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\sklearn\_build_utils\__init__.py", line 42, in maybe_cythonize_extensions
    with_openmp = check_openmp_support()
  File "C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\sklearn\_build_utils\openmp_helpers.py", line 83, in check_openmp_support
    ccompiler.compile(['test_openmp.c'], output_dir='objects',
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
    self.initialize()
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
    vc_env = _get_vc_env(plat_spec)
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
    return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 1075, in __init__
    self.si = SystemInfo(self.ri, vc_ver)
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 547, in __init__
    vc_ver or self._find_latest_available_vs_ver())
  File "c:\users\kevvelas\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 561, in _find_latest_available_vs_ver
    raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\kevvelas\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\scikit-learn\setup.py'"'"'; file='"'"'C:\Users\KEVVELAS\AppData\Local\Temp\pip-install-1e5i5bj9\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 'C:\Users\KEVVELAS\AppData\Local\Temp\pip-record-8rc0qj21\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

Intente instalando los siguientes paquetes según lo que investigue en otras paginas y me sigue saliendo el mismo error:

pip install -U setuptools
pip install -U wheel
pip3 install scikit-learn
pip install numpy
pip install scipy
python -m pip install -U pip setuptools

2 respuestas 2

0

Bueno al fin pude solucionarlo Para los que les sale este mismo problema yo hice lo siguiente Desintale la version actual de python(3.8) e instale la version 3.7.0 y ya se pudo instalar :)

-1

En efecto, sólo tienes que leer la documentación actual de Python 3 y verás que muchas de las librerias aún no funcionan correctamente sobre las versiones superiores a Python 3.8

1

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.