osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python Error Still Occured on sklearn


Thank you.





Maisarah Binti Mohd Yusak


Certified CPRE-FL & CTFL

Software Tester, IT Team.



AVL Infotech (Malaysia) Sdn. Bhd.



?



L2-I-3, Enterprise - 4 , Technology Park Malaysia,
Bukit Jalil, Kuala Lumpur, Malaysia -57000
Mobile: +6016 507 3051
Mail:?mailto:maisarah at avlinfotech.net

LinkedIn: https://my.linkedin.com/in/maimoyu

Web:?http://www.avlinfotech.net/










---- On Mon, 02 Dec 2019 17:30:24 +0800 Maisarah <maisarah at avlinfotech.net> wrote ----


Dear Admin,



I have install and upgrade Cython as well.?

I have modified and repaired and even update the library but error is still occurred:



C:\Windows\system32>pip install -U scikit-learn 

Collecting scikit-learn

? Using cached https://files.pythonhosted.org/packages/1e/ce/9d8c88e68af0a5b5c5d78d8d2b7bcadfd45e1d6afc863ccb9aee30765b06/scikit-learn-0.21.3.tar.gz

Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.17.4)

Requirement already satisfied, skipping upgrade: scipy>=0.17.0 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.3.3)

Requirement already satisfied, skipping upgrade: joblib>=0.11 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (0.14.0)

Installing collected packages: scikit-learn

??? Running setup.py install for scikit-learn ... error

??? ERROR: Command errored out with exit status 1:

???? command: 'c:\users\user\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-caioz9bv\\scikit-learn\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-caioz9bv\\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\user\AppData\Local\Temp\pip-record-o9y5q4bk\install-record.txt' --single-version-externally-managed --compile

???????? cwd: C:\Users\user\AppData\Local\Temp\pip-install-caioz9bv\scikit-learn\

??? Complete output (44 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 "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver

??????? return self.find_available_vc_vers()[-1]

??? IndexError: list index out of range



??? During handling of the above exception, another exception occurred:



??? Traceback (most recent call last):

????? File "<string>", line 1, in <module>

????? File "C:\Users\user\AppData\Local\Temp\pip-install-caioz9bv\scikit-learn\setup.py", line 290, in <module>

??????? setup_package()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-caioz9bv\scikit-learn\setup.py", line 286, in setup_package

??????? setup(**metadata)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\numpy\distutils\core.py", line 137, in setup

??????? config = configuration()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-caioz9bv\scikit-learn\setup.py", line 174, in configuration

??????? config.add_subpackage('sklearn')

????? File "c:\users\user\appdata\local\programs\python\python38\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\user\appdata\local\programs\python\python38\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage

??????? config = self._get_configuration_from_setup_py(

????? File "c:\users\user\appdata\local\programs\python\python38\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\user\AppData\Local\Temp\pip-install-caioz9bv\scikit-learn\sklearn\_build_utils\__init__.py", line 42, in maybe_cythonize_extensions

??????? with_openmp = check_openmp_support()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-caioz9bv\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\user\appdata\local\programs\python\python38\lib\distutils\_msvccompiler.py", line 360, in compile

??????? self.initialize()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\_msvccompiler.py", line 253, in initialize

??????? vc_env = _get_vc_env(plat_spec)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env

??????? return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 843, in __init__

??????? self.si = SystemInfo(self.ri, vc_ver)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 485, in __init__

??????? self.vc_ver = vc_ver or self._find_latest_available_vc_ver()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver

??????? raise distutils.errors.DistutilsPlatformError(err)

??? distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

??? ----------------------------------------

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



C:\Windows\system32>pip install --upgrade -U scikit-learn

Collecting scikit-learn

? Using cached https://files.pythonhosted.org/packages/1e/ce/9d8c88e68af0a5b5c5d78d8d2b7bcadfd45e1d6afc863ccb9aee30765b06/scikit-learn-0.21.3.tar.gz

Requirement already satisfied, skipping upgrade: numpy>=1.11.0 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.17.4)

Requirement already satisfied, skipping upgrade: scipy>=0.17.0 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.3.3)

Requirement already satisfied, skipping upgrade: joblib>=0.11 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (0.14.0)

Installing collected packages: scikit-learn

??? Running setup.py install for scikit-learn ... error

??? ERROR: Command errored out with exit status 1:

???? command: 'c:\users\user\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-48dlq_5d\\scikit-learn\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-48dlq_5d\\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\user\AppData\Local\Temp\pip-record-arwze1t4\install-record.txt' --single-version-externally-managed --compile

???????? cwd: C:\Users\user\AppData\Local\Temp\pip-install-48dlq_5d\scikit-learn\

??? Complete output (44 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 "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver

??????? return self.find_available_vc_vers()[-1]

??? IndexError: list index out of range



??? During handling of the above exception, another exception occurred:



??? Traceback (most recent call last):

????? File "<string>", line 1, in <module>

????? File "C:\Users\user\AppData\Local\Temp\pip-install-48dlq_5d\scikit-learn\setup.py", line 290, in <module>

??????? setup_package()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-48dlq_5d\scikit-learn\setup.py", line 286, in setup_package

??????? setup(**metadata)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\numpy\distutils\core.py", line 137, in setup

??????? config = configuration()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-48dlq_5d\scikit-learn\setup.py", line 174, in configuration

??????? config.add_subpackage('sklearn')

????? File "c:\users\user\appdata\local\programs\python\python38\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\user\appdata\local\programs\python\python38\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage

??????? config = self._get_configuration_from_setup_py(

????? File "c:\users\user\appdata\local\programs\python\python38\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\user\AppData\Local\Temp\pip-install-48dlq_5d\scikit-learn\sklearn\_build_utils\__init__.py", line 42, in maybe_cythonize_extensions

??????? with_openmp = check_openmp_support()

????? File "C:\Users\user\AppData\Local\Temp\pip-install-48dlq_5d\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\user\appdata\local\programs\python\python38\lib\distutils\_msvccompiler.py", line 360, in compile

??????? self.initialize()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\distutils\_msvccompiler.py", line 253, in initialize

??????? vc_env = _get_vc_env(plat_spec)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env

??????? return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 843, in __init__

??????? self.si = SystemInfo(self.ri, vc_ver)

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 485, in __init__

??????? self.vc_ver = vc_ver or self._find_latest_available_vc_ver()

????? File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver

??????? raise distutils.errors.DistutilsPlatformError(err)

??? distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

??? ----------------------------------------

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



C:\Windows\system32>







Kindly advice in English language, please.



Thank you.





Maisarah Binti Mohd Yusak


Certified CPRE-FL & CTFL

Software Tester, IT Team.



AVL Infotech (Malaysia) Sdn. Bhd.



?



L2-I-3, Enterprise - 4 , Technology Park Malaysia,
Bukit Jalil, Kuala Lumpur, Malaysia -57000
Mobile: +6016 507 3051
Mail:?mailto:maisarah at avlinfotech.net

LinkedIn: https://my.linkedin.com/in/maimoyu

Web:?http://www.avlinfotech.net/