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

pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory #2

Open
fusaroli opened this issue Jul 7, 2015 · 4 comments

Comments

@fusaroli
Copy link

fusaroli commented Jul 7, 2015

First thanks for this very promising project! I am having some issues getting the tests to work.

The installation worked smoothly and I got no error message. But when I try to run the tests I get this (see full version at the bottom):

pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory

I am using OsX 10.10.4 and python 2.7. I wonder whether this is an issue due to changes in OsX compilers. This is my current:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

And here the full output of the tests:

  File "tests/gmm_test.py", line 4, in <module>
    from gmm_specializer.gmm import GMM 
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 61, in <module>
    class GMM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 69, in GMM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "tests/svm_test.py", line 4, in <module>
    from svm_specializer.svm import * 
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/svm_specializer/svm.py", line 77, in <module>
    class SVM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/svm_specializer/svm.py", line 84, in SVM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "tests/svm_gmm_test.py", line 1, in <module>
    from gmm_specializer.gmm import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 61, in <module>
    class GMM(object):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pycasp-0.1-py2.7.egg/gmm_specializer/gmm.py", line 69, in GMM
    platform = PlatformDetector()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/config.py", line 24, in __init__
    self.cuda_util_mod = asp_module.ASPModule(use_cuda=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/asp-0.1.3.1-py2.7.egg/asp/jit/asp_module.py", line 352, in __init__
    codepy.toolchain.guess_toolchain(),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/codepy-2013.1.2-py2.7.egg/codepy/toolchain.py", line 415, in guess_toolchain
    result, version, stderr = call_capture_output([kwargs["cc"], "--version"])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 197, in call_capture_output
    return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pytools/prefork.py", line 54, in call_capture_output
    % ( " ".join(cmdline), e))
pytools.prefork.ExecError: error invoking 'g++-4.2 --version': [Errno 2] No such file or directory
@egonina
Copy link
Owner

egonina commented Jul 7, 2015

Hi, thanks for your interest. This project is not under active development and was originally developed on linux platforms. What does g++-4.2 --version give you?

@fusaroli
Copy link
Author

fusaroli commented Jul 7, 2015

Thanks for your answer. OsX has replaced gcc with clang. If I write g++-4.2 -- version, I get "command not found". If I write g++ --version, I get:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

@egonina
Copy link
Owner

egonina commented Jul 7, 2015

Try: sudo ln -sn /usr/bin/g++ /usr/bin/g++-4.2 ?
http://stackoverflow.com/questions/8368834/error-with-inline-and-xcode-4-2-1

@cunnie
Copy link

cunnie commented Mar 18, 2016

@fusaroli : I gave up installing PyCASP on a Mac, but I did have success installing it on Amazon AWS, and I've written some notes here: https://github.com/egonina/pycasp/wiki/PyCASP-on-Amazon-AWS .

Also, the procedure to install PyCASP should be generalizable to installing on any Ubuntu 14.04 system. For example, I followed the procedure to set up PyCASP on my Thinkpad T440p (with NVIDIA CUDA cores).

If you notice any mistakes, please don't hesitate to edit the Wiki directly.

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

3 participants