Python Forum
kmeans install error (please help me)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
kmeans install error (please help me)
#1
Merhaba,

python 3.10 versiyonunda kmeans yüklemeye çalıştığımda aşağıdaki hatayı alıyorum bunu nasıl geçerim

creating build\temp.win-amd64-cpython-310\Release\kmeans
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\XMAN\AppData\Local\Programs\Python\Python310\include -IC:\Users\XMAN\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tckmeans/lib.c /Fobuild\temp.win-amd64-cpython-310\Release\kmeans/lib.obj -Wno-error=declaration-after-statement -O3 -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration-after-statement'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for kmeans
Reply
#2
You get that error message because it try to compile code.
kmeans use C code it's also old.
It's not a easy task to setup complier for this on Windows.

You better of install sklearn which has sklearn.cluster.KMeans
See issues and authors response.
Quote:Good call 👍 scikit-learn is going to be far more robust than a random C script I wrote half a decade ago.
Reply
#3
how to install sklearn.cluster.KMeans ? what command do i use
Reply
#4
It's a part scikit-learn Installing scikit-learn,so you install with:
pip install -U scikit-learn
Test.
>>> from sklearn.cluster import KMeans
>>> 
>>> help(KMeans)
.....
Look at doc or a tutorial
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error with pip install coffeeguy 1 319 Sep-08-2022, 01:27 AM
Last Post: snippsat
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 4,991 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 3,558 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Minecraft Python install error SomeAcandKid 1 1,305 Oct-06-2021, 06:27 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 3,811 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  error trying to install sslstrip NullAdmin 1 2,791 Mar-11-2021, 09:37 PM
Last Post: buran
  python setup.py install error blackclover 2 5,382 Jan-07-2021, 04:36 AM
Last Post: blackclover
  Create homogeneous groups with Kmeans ? preliator 0 1,028 Sep-01-2020, 02:29 PM
Last Post: preliator
  trying to pip install stasm module getting error djf123 3 3,304 Jul-26-2020, 05:00 AM
Last Post: millpond
  pip install -e ., ERROR: Failed building wheel for pyfarmhash mostafaPython 1 4,828 Jun-09-2020, 08:24 PM
Last Post: mcmxl22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020