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
  Install error middlestudent 1 713 Sep-23-2023, 08:26 AM
Last Post: middlestudent
  wxPython install error carlomscalisi 3 3,545 Jan-17-2023, 11:04 AM
Last Post: snippsat
  Error with pip install coffeeguy 1 2,207 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 10,488 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,717 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Minecraft Python install error SomeAcandKid 1 2,308 Oct-06-2021, 06:22 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,515 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  error trying to install sslstrip NullAdmin 1 3,984 Mar-11-2021, 09:37 PM
Last Post: buran
  python setup.py install error blackclover 2 7,795 Jan-07-2021, 04:36 AM
Last Post: blackclover
  Create homogeneous groups with Kmeans ? preliator 0 1,500 Sep-01-2020, 02:29 PM
Last Post: preliator

Forum Jump:

User Panel Messages

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