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

CMake must be installed to build OSQP #4

Closed
krishnan-r opened this issue May 31, 2018 · 7 comments
Closed

CMake must be installed to build OSQP #4

krishnan-r opened this issue May 31, 2018 · 7 comments

Comments

@krishnan-r
Copy link

krishnan-r commented May 31, 2018

It seems this package needs CMake during a pip install.

RuntimeError: CMake must be installed to build OSQP

If I do pip install cmake it works after.

Can't cmake be added to the setup_requires field in setup.py?
This would make the installation process smoother for many libraries that depend on this one.
I'll make a PR if this can be done?

@goulart-paul
Copy link
Collaborator

goulart-paul commented May 31, 2018 via email

@bstellato
Copy link
Contributor

Thanks! Added it in 4078327

@krishnan-r
Copy link
Author

I'm sorry this doesn't work as expected. The setup_requires option does not install the package in a full fledged way, it only downloads it temporarily into a local folder, making packages importable. It works for cases like numpy, where it can be imported from within a custom command in setup.py. But cmake is called in setup.py as a subprocess (also before the setup function), which requires it to be in the sys path. Perhaps cmake needs to be called as a python module.

I tried installing the master branch, but doesn't work.

@bstellato
Copy link
Contributor

The best option is to install cmake separately independently from the language. That's what we suggest in the instructions.

The fact that OSQP is not directly installed using a binary is probably because you are using pip and linux (see #3). Note that cmake is also needed for code generation.

@bstellato bstellato reopened this May 31, 2018
@krishnan-r
Copy link
Author

Yes you are right. I guess then CMake is best installed separately.

@bstellato
Copy link
Contributor

I have reverted the commit in 8336546. I will close the issue since it looks like it will not appear again when we release the manylinux binaries.

@ChemGuy88
Copy link

Hi. I was installing scikit-survival, which has OSQP as one of its requirements (?), and it kept throwing some errors. I stumbled across this thread and did python3 -m pip install --user cmake and afterwards python3 -m pip install --user scikit-survival finally worked.

I'm on a 2016 MacBook Pro macOS 11.0.1 with python 3.8. I don't know if this will inform your development any.

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

4 participants