I am unable to use pip install to install a library in jupyter notebook.
I tried running pip install ffprobe
and I received the error below
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_19512\1427077936.py in <module>
----> 1 get_ipython().run_line_magic('conda', 'install -c travis ffprobe')
~\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2362 kwargs['local_ns'] = self.get_local_scope(stack_depth)
2363 with self.builtin_trap:
-> 2364 result = fn(*args, **kwargs)
2365 return result
2366
~\anaconda3\lib\site-packages\decorator.py in fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
--> 232 return caller(func, *(extras + args), **kw)
233 fun.__name__ = func.__name__
234 fun.__doc__ = func.__doc__
~\anaconda3\lib\site-packages\IPython\core\magic.py in <lambda>(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):
~\anaconda3\lib\site-packages\IPython\core\magics\packaging.py in conda(self, line)
107 extra_args.extend(["--prefix", sys.prefix])
108
--> 109 self.shell.system(' '.join([conda, command] + extra_args + args))
110 print("\nNote: you may need to restart the kernel to use updated packages.")
~\anaconda3\lib\site-packages\ipykernel\zmqshell.py in system_piped(self, cmd)
629 if path is not None:
630 cmd = "pushd %s &&%s" % (path, cmd)
--> 631 self.user_ns["_exit_code"] = system(cmd)
632 else:
633 self.user_ns["_exit_code"] = system(self.var_expand(cmd, depth=1))
~\anaconda3\lib\site-packages\IPython\utils\_process_win32.py in system(cmd)
143 if path is not None:
144 cmd = '"pushd %s &&"%s' % (path, cmd)
--> 145 return process_handler(cmd, _system_body)
146
147 def getoutput(cmd):
~\anaconda3\lib\site-packages\IPython\utils\_process_common.py in process_handler(cmd, callback, stderr)
77 if shell and os.name == 'posix' and 'SHELL' in os.environ:
78 executable = os.environ['SHELL']
---> 79 p = subprocess.Popen(cmd, shell=shell,
80 executable=executable,
81 stdin=subprocess.PIPE,
~\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, user, group, extra_groups, encoding, errors, text, umask)
949 encoding=encoding, errors=errors)
950
--> 951 self._execute_child(args, executable, preexec_fn, close_fds,
952 pass_fds, cwd, env,
953 startupinfo, creationflags, shell,
~\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_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session)
1418 # Start the process
1419 try:
-> 1420 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1421 # no special security
1422 None, None,
FileNotFoundError: [WinError 2] The system cannot find the file specified
The first thing I tried to do was add --user at the end of my command so it is pip install ffprobe-python --user but I still received the same error. After that I tried upgrading pip using pip install --upgrade pip but it didn't work.
I tried entering anaconda3/share/jupyter/python3 and checking if the kernel.json file has any issue but there was no problem
Lastly I tried going into subprocesses.py and changing the shell from this function to true but it didnt solve anything
def __init__(self, args, bufsize=-1, executable=None,
stdin=None, stdout=None, stderr=None,
preexec_fn=None, close_fds=True,
shell=False, cwd=None, env=None, universal_newlines=None,
startupinfo=None, creationflags=0,
restore_signals=True, start_new_session=False,
pass_fds=(), *, user=None, group=None, extra_groups=None,
encoding=None, errors=None, text=None, umask=-1):
Please do let me know if any more information needs to be provided as I am quite new to this and any help would be greatly appreciated.
I just tried %conda install -c travis ffprobe and installing the package that was mentioned however I still received the same error as the one above.