installing sklearn

Thomas Jollans tjol at tjol.eu
Wed Jul 4 13:41:38 EDT 2018


On 04/07/18 17:30, muhammet bozkurt wrote:
> When i try to install sklearn, i encounter a problem which is “No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils” and ai don’t know how to deal with it therafore i need some help. Could you help me?(by the way i installed numpy)

I'm pretty sure this is not a problem. The actual error message is at
the bottom.


>     creating build\temp.win32-3.7\sklearn\svm\src\libsvm
>     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\muham\appdata\local\programs\python\python37-32\lib\site-packages\numpy\core\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpsklearn\svm\src\libsvm\libsvm_template.cpp /Fobuild\temp.win32-3.7\sklearn\svm\src\libsvm\libsvm_template.obj
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "C:\Users\muham\AppData\Local\Temp\pip-install-_30ehor_\scikit-learn\setup.py", line 269, in <module>
>         setup_package()

>       [snip]

>       File "c:\users\muham\appdata\local\programs\python\python37-32\lib\site-packages\numpy\distutils\ccompiler.py", line 139, in CCompiler_spawn
>         s, o = exec_command(cmd)

>       [snip]

>     UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 424: character maps to <undefined>



Now, I have no idea what causes this problem, and whether it's something
about your system, or what. I do know that installing extension modules
from source on Windows *can* be tricky.

scikit-learn doesn't provide Python 3.7 binaries yet. They do provide
binaries for Python 3.6. So the simplest solution to your immediate
problem might be to stick with Python 3.6 for the time being until all
the packages you rely on have been updated.

-- Thomas



More information about the Python-list mailing list