Skip to content

Does not work on windows 10. #3

@spencerm89

Description

@spencerm89

Does not work on windows 10. Receive error below when running hello world example.


FileNotFoundError Traceback (most recent call last)
in
----> 1 get_ipython().run_cell_magic('cpp', '', '\n#include <stdio.h>\n\nint main(void) {\n printf("Hello World");\n return 0;\n}\n')

C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2397 with self.builtin_trap:
2398 args = (magic_arg_s, cell)
-> 2399 result = fn(*args, **kwargs)
2400 return result
2401

C:\ProgramData\Anaconda3\lib\site-packages\decorator.py in fun(*args, **kw)
229 if not kwsyntax:
230 args, kw = fix(args, kw, sig)
--> 231 return caller(func, *(extras + args), **kw)
232 fun.name = func.name
233 fun.doc = func.doc

C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

C:\ProgramData\Anaconda3\lib\site-packages\cppmagic.py in cpp(self, line, cell)
49 f.write(cell)
50 try:
---> 51 self._compile(file_path)
52 output = self._run(file_path, timeit=args.timeit)
53 except subprocess.CalledProcessError as e:

C:\ProgramData\Anaconda3\lib\site-packages\cppmagic.py in _compile(self, file_path)
25
26 def _compile(self, file_path):
---> 27 subprocess.check_output(["g++", file_path + ".cpp", "-o", file_path + ".out"], stderr=subprocess.STDOUT)
28
29 def _run(self, file_path, timeit=False):

C:\ProgramData\Anaconda3\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
413 kwargs['input'] = empty
414
--> 415 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
416 **kwargs).stdout
417

C:\ProgramData\Anaconda3\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
491 kwargs['stderr'] = PIPE
492
--> 493 with Popen(*popenargs, **kwargs) as process:
494 try:
495 stdout, stderr = process.communicate(input, timeout=timeout)

C:\ProgramData\Anaconda3\lib\subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
856 encoding=encoding, errors=errors)
857
--> 858 self._execute_child(args, executable, preexec_fn, close_fds,
859 pass_fds, cwd, env,
860 startupinfo, creationflags, shell,

C:\ProgramData\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1309 # Start the process
1310 try:
-> 1311 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1312 # no special security
1313 None, None,

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions