vadimkantorov / caffemodel2pytorch

Convert Caffe models to PyTorch
389 stars 84 forks source link

FileNotFoundError: [WinError 2] #28

Closed AOguo21 closed 1 year ago

AOguo21 commented 1 year ago

When I run caffemodel,I got this error,Can you offer me some help? Traceback (most recent call last): File "C:\Users\Admin\Desktop\caffemodel\caffemodel2pytorch\caffemodel2pytorch.py", line 383, in net_param = initialize(args.caffe_proto).NetParameter() File "C:\Users\Admin\Desktop\caffemodel\caffemodel2pytorch\caffemodel2pytorch.py", line 39, in initialize subprocess.check_call(['protoc', '--proto_path', os.path.dirname(local_caffe_proto), '--python_out', codegen_dir, local_caffe_proto]) File "C:\Users\Admin\anaconda3\envs\python3.8\lib\subprocess.py", line 359, in check_call retcode = call(*popenargs, *kwargs) File "C:\Users\Admin\anaconda3\envs\python3.8\lib\subprocess.py", line 340, in call with Popen(popenargs, **kwargs) as p: File "C:\Users\Admin\anaconda3\envs\python3.8\lib\subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Admin\anaconda3\envs\python3.8\lib\subprocess.py", line 1327, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the specified file。(I've translated the Chinese version of the error.)

vadimkantorov commented 1 year ago

You need to make sure that protoc (the protobuf codegen compiler) exists on the PATH and is callable by Python.