Closed MLobatoR closed 3 weeks ago
Hi :wave:, can you please execute the following commands individually and show me the output:
where python
python -m pip uninstall -y k-means-constrained
python -m pip install k-means-constrained
python -c "import k_means_constrained; print(k_means_constrained)"
Hi @joshlk,
Here's the result:
python -m pip uninstall -y k-means-constrained
Found existing installation: k-means-constrained 0.7.3 Uninstalling k-means-constrained-0.7.3: Successfully uninstalled k-means-constrained-0.7.3
python -m pip install k-means-constrained
Collecting k-means-constrained Obtaining dependency information for k-means-constrained from https://files.pythonhosted.org/packages/d6/f4/23354675bbbbac8b660c7e971e2e7a4f29f0327adee92db714eb9bbc4f7f/k_means_constrained-0.7.3-cp311-cp311-win_amd64.whl.metadata Using cached k_means_constrained-0.7.3-cp311-cp311-win_amd64.whl.metadata (4.3 kB) Requirement already satisfied: ortools>=9.4.1874 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (9.7.2996) Requirement already satisfied: scipy>=1.6.3 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.10.1) Requirement already satisfied: numpy>=1.23.0 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.24.3) Requirement already satisfied: six in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.16.0) Requirement already satisfied: joblib in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.2.0) Requirement already satisfied: absl-py>=0.13 in c:\apps\anaconda\lib\site-packages (from ortools>=9.4.1874->k-means-constrained) (2.0.0) Requirement already satisfied: protobuf>=4.23.3 in c:\apps\anaconda\lib\site-packages (from ortools>=9.4.1874->k-means-constrained) (4.24.4) Using cached k_means_constrained-0.7.3-cp311-cp311-win_amd64.whl (330 kB) Installing collected packages: k-means-constrained Successfully installed k-means-constrained-0.7.3
python -c "import k_means_constrained; print(k_means_constrained)"
<module 'k_means_constrained' from 'C:\\Apps\\anaconda\\Lib\\site-packages\\k_means_constrained\\__init__.py'>
Hi, I can see from the last command that Python importedk_means_constrained
ok. Is it now working?
No, despite being ok, the import is not recognized
Hi,
I'm having some trouble importing k-means-constrained.
I've already downloaded but it seems that I'm missing somenthing:
Requirement already satisfied: k-means-constrained in c:\apps\anaconda\lib\site-packages (0.7.3) Requirement already satisfied: ortools>=9.4.1874 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (9.7.2996) Requirement already satisfied: scipy>=1.6.3 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.10.1) Requirement already satisfied: numpy>=1.23.0 in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.24.3) Requirement already satisfied: six in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.16.0) Requirement already satisfied: joblib in c:\apps\anaconda\lib\site-packages (from k-means-constrained) (1.2.0) Requirement already satisfied: absl-py>=0.13 in c:\apps\anaconda\lib\site-packages (from ortools>=9.4.1874->k-means-constrained) (2.0.0) Requirement already satisfied: protobuf>=4.23.3 in c:\apps\anaconda\lib\site-packages (from ortools>=9.4.1874->k-means-constrained) (4.24.4)
When I try to import like this I have the following error : "No module named 'k_means_constrained' "
import k_means_constrained as kmc
I don't get what I'm doing wrong. Can you please advise?
Thank you, ML