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

Installation from source fails due to missing cmake exectuable #723

Closed
pk-g opened this issue Apr 5, 2018 · 16 comments
Closed

Installation from source fails due to missing cmake exectuable #723

pk-g opened this issue Apr 5, 2018 · 16 comments

Comments

@pk-g
Copy link
Contributor

pk-g commented Apr 5, 2018

My recent installation attempts from source keeps failing with following error

"AssertionError: Could not find "cmake" executable!
Command "python setup.py egg_info" failed with error code 1"

Is this a known issue?

@houseroad
Copy link
Member

@bddppq
Copy link
Member

bddppq commented Apr 5, 2018

cmake is a system package, not a python package, so adding it to setup.py doesn't work.
It is a required dependency for building onnx now, so we should add it to our README.

@pk-g
Copy link
Contributor Author

pk-g commented Apr 5, 2018

Thanks guys, updating the README sounds great.

@pk-g pk-g closed this as completed Apr 5, 2018
@iamshri8
Copy link

iamshri8 commented Jan 13, 2019

@bddppq How to add it to our README? I also got the same error while running setup.py for onnx installation from source

@Seth-Julien-de-Lampon
Copy link

I get same error when using: pip install onnx
Any fix?

@Mathias5
Copy link

Installing cmake using the command "conda install cmake" worked for me

@Ananyaaa
Copy link

I am trying to install it on windows 10 and i am still getting the assert error.

Complete output from command python setup.py egg_info:
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Public\Documents\iSkysoft\CreatorTemp\pip-install-nl0d7cz_\onnx\setup.py", line 71, in
assert CMAKE, 'Could not find "cmake" executable!'

Can someone help?

@Rathna21
Copy link

@Ananyaaa CMAKE is not available. That is the problem. download cmake from here and then try running the script.

@Ananyaaa
Copy link

@Rathna21 thanks for response. I understand that cmake is not available and i installed it using https://chocolatey.org/packages/cmake. But still i am facing the same issue. I will see where cmake gets installed and see whether it actually got installed? Can anyone help on where does the cmake gets installed if i use the chocolatey?

@Ananyaaa
Copy link

Thanks @Rathna21. I have manually added the cmake to path variable. Now the earlier assert issue got resolved, but i am getting
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Cam some one help?

@charanpool
Copy link

from anaconda promt, which you will get after installing anaconda package, just enter conda install cmake and then in normal command prompt just run pip install <package_name>. It worked for me.

@gkUwen
Copy link

gkUwen commented Sep 16, 2019

My solution is:
First, make sure you have installed camke. And use "which cmake" command to get the directory of your camke path.
Second, add the path in the setup.py file. For example, I set it as

CMAKE = find_executable('cmake') or find_executable('cmake3')
MAKE = find_executable('make') #we already have this two line in the setup.py
CMAKE = "/home/uwen/anaconda3/bin/cmake"

@mkbhanda
Copy link

On a MAC, was able to install onyx once I used brew to install Cmake and protobuf (which provides the proto compiler /aka protoc) (Downloading a release and changing $PATH etc did not work).

brew install Cmake
brew install protobuf

@sergiev
Copy link

sergiev commented Sep 20, 2022

For me, conda solution was not as useful as simple sudo apt-get install build-essential cmake

@PlinyTheMid
Copy link

try
pip3 install onnx=1.8.1
as someone suggested and then run this
pip3 install onnx-simplifier
i was using conda env, with python 3.7

@omairi
Copy link

omairi commented Apr 11, 2024

I was installing unstructured and got this error "cmake is not available"
conda install cmake
then puip install <> worked

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