Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Won't install #27

Closed
thistleknot opened this issue Jul 29, 2022 · 1 comment
Closed

[BUG] Won't install #27

thistleknot opened this issue Jul 29, 2022 · 1 comment

Comments

@thistleknot
Copy link

Describe the bug
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for k_means_constrained
Building wheel for rpy2 (setup.py) ... done
Created wheel for rpy2: filename=rpy2-3.5.3-py3-none-any.whl size=207845 sha256=0c527502a43f4996efb61dfeb687e1794c223af9740121fac9bb43e8b27d4175
Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\58\f3\83\9105378219a010ded1729668fe32e073186237ba8a223ea4ce
Successfully built rpy2
Failed to build k_means_constrained
ERROR: Could not build wheels for k_means_constrained, which is required to install pyproject.toml-based projects

(JupyterLab) C:\Users\User\Documents\wiki\wiki\dev\python\Python-Stock\code\Screener>pip install --upgrade wheel
Requirement already satisfied: wheel in c:\users\user\appdata\local\programs\jupyterlab\lib\site-packages (0.37.1)

Note: Tried to install Microsoft Visual C++ 14.0 via two files BuildTools_MSBuild.msi and BuildTools_MSBuild.exe. The msi I found, but could not get to work properly. When I installed the .exe, v14 installs, but still would throw the same error when I tried to pip install.

Minimum working example
pip install k-means_constrained

Versions:

  • Python: 3.10.5
  • Operating system: [Windows/MacOS/Linux] Win10
  • k-means-constrained:
  • numpy:
  • scipy:
  • ortools:
  • joblib:
  • cython (if installed):
@rrenslow
Copy link

rrenslow commented Aug 24, 2022

I had the same issue. I followed the first answer here: https://stackoverflow.com/questions/64261546/how-to-solve-error-microsoft-visual-c-14-0-or-greater-is-required-when-inst

Go to this link and download Microsoft C++ Build Tools:
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Select: Workloads → Desktop development with C++
Then for Individual Components, select only:
*Windows 10 SDK
*C++ x64/x86 build tools

I restarted the computer afterwards, and now it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants