1
resposta

Erro instalação scikit no Windows Python 3.9

Intalaçõa do scikit está apresentando o erro abaixo

C:>pip install -U scikit-learn Collecting scikit-learn Using cached scikit-learn-0.23.2.tar.gz (7.2 MB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: 'c:\users\Gurgel\appdata\local\programs\python\python39\python.exe' 'c:\users\Gurgel\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Gurgel\AppData\Local\Temp\pip-build-env-o9c45dds\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 Complete output (303 lines): Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation == "CPython"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation != "CPython"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment .......... Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed. Installing collected packages: numpy, wheel, setuptools, scipy, Cython Running setup.py install for numpy: started Running setup.py install for numpy: finished with status 'error' ERROR: Command errored out with exit status 1: ............. No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils

  error: 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\Gurgel\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Gurgel\AppData\Local\Temp\pip-install-n9h24p41\numpy_d1f9ca583b2d47aa8f59972cb4c3bd88\setup.py'"'"'; file='"'"'C:\Users\Gurgel\AppData\Local\Temp\pip-install-n9h24p41\numpy_d1f9ca583b2d47aa8f59972cb4c3bd88\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\Gurgel\AppData\Local\Temp\pip-record-cjpd_zed\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Gurgel\AppData\Local\Temp\pip-build-env-o9c45dds\overlay' --compile --install-headers 'C:\Users\Gurgel\AppData\Local\Temp\pip-build-env-o9c45dds\overlay\Include\numpy' Check the logs for full command output.

ERROR: Command errored out with exit status 1: 'c:\users\Gurgel\appdata\local\programs\python\python39\python.exe' 'c:\users\Gurgel\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Gurgel\AppData\Local\Temp\pip-build-env-o9c45dds\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 resposta

Olá Francisco, tudo bem? Espero que sim!

Desculpe pela demora em retornar.

Para facilitar a instalação de pacotes, sugiro instalar o software Anaconda, ele vem com principais pacotes utilizados em ciência de dados, incluindo o sci-kit learn e numpy e instala também a linguagem Python no computador. Você pode criar ambientes virtuais separadamente e fazer uso de Notebooks que facilitam a escrita e visualização dos códigos.

Você pode ver esse artigo que te dá a informação para instalar o anaconda:

Pode acessar o site para download do anaconda clicando nesse link.

Bons estudos!