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

FileNotFoundError: [WinError 2] The system cannot find the file specified #6

Open
chtenb opened this issue Dec 3, 2016 · 3 comments

Comments

@chtenb
Copy link

chtenb commented Dec 3, 2016

$ autopxd.exe Include/MyHeader.h MyHeader.pxd
Traceback (most recent call last):
  File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python34\Scripts\autopxd.exe\__main__.py", line 9, in <module>
  File "c:\python34\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "c:\python34\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\python34\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python34\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\python34\lib\site-packages\autopxd\__init__.py", line 341, in cli
    outfile.write(translate(infile.read(), infile.name))
  File "c:\python34\lib\site-packages\autopxd\__init__.py", line 333, in translate
    p.visit(parse(code, extra_cpp_args=['-I', extra_incdir]))
  File "c:\python34\lib\site-packages\autopxd\__init__.py", line 319, in parse
    preprocessed = preprocess(code, extra_cpp_args=extra_cpp_args)
  File "c:\python34\lib\site-packages\autopxd\__init__.py", line 308, in preprocess
    ] + extra_cpp_args + ['-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "c:\python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "c:\python34\lib\subprocess.py", line 1114, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

I'm on windows 7, and the filenames passed to autopxd do exist!

@per42
Copy link

per42 commented Jan 16, 2017

Is cpp in the path?

@chtenb
Copy link
Author

chtenb commented Jan 16, 2017

What does cpp mean?

@per42
Copy link

per42 commented Jun 13, 2017

cpp is the C preprocessor. It must be on your PATH.

On my system:

C:\Users\Per\code>where cpp
C:\msys64\mingw64\bin\cpp.exe

C:\Users\Per\code>echo const char *version = __VERSION__; | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
const char *version = "6.3.0";

I use MinGW-w64 in MSYS2

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