npKq2OaScript.rc(208): error RC2135: file not found: npKq2OaScript.tlb

本文详细介绍了如何解决Visual Studio编译时出现的RC2135错误,该错误通常由文件路径配置不当引起。通过调整项目属性中的资源设置和中间目录设置,确保输出目录与类型库目录一致,可以有效解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原因一:

解决:项目右键属性,配置属性,资源,常规

附加包含目录:$(IntDir)

参考:http://www.codeproject.com/Tips/389503/Solve-error-RC2135-file-not-found-xxxxx-tlb

原因二:

输出目录和.tlb目录不一致,检查下面两处

常规->中间目录->Debug
MIDL->高级->类型库->$(IntDir)/xxx.tlb

PS C:\Users\zhuxinyu> & C:/Users/zhuxinyu/AppData/Local/Programs/Python/Python312/python.exe c:/Users/zhuxinyu/Desktop/数模代码/投资(线性规划).py Traceback (most recent call last): File "c:\Users\zhuxinyu\Desktop\数模代码\投资(线性规划).py", line 31, in <module> res=linprog(c,A,b,Aeq,beq,bounds=[(0,None),(0,None),(0,None),(0,None)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog.py", line 649, in linprog lp, solver_options = _parse_linprog(lp, options, meth) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 1026, in _parse_linprog lp = _clean_inputs(lp._replace(A_ub=A_ub, A_eq=A_eq)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 462, in _clean_inputs raise ValueError( ValueError: Invalid input for linprog: unable to interpret bounds with this dimension tuple: (4, 2). PS C:\Users\zhuxinyu> & C:/Users/zhuxinyu/AppData/Local/Programs/Python/Python312/python.exe c:/Users/zhuxinyu/Desktop/数模代码/投资(线性规划).py Traceback (most recent call last): File "c:\Users\zhuxinyu\Desktop\数模代码\投资(线性规划).py", line 34, in <module> res=linprog(c,A,b,Aeq,beq,bounds=bounds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog.py", line 649, in linprog lp, solver_options = _parse_linprog(lp, options, meth) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 1026, in _parse_linprog lp = _clean_inputs(lp._replace(A_ub=A_ub, A_eq=A_eq)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 462, in _clean_inputs raise ValueError( ValueError: Invalid input for linprog: unable to interpret bounds with this dimension tuple: (4, 2). PS C:\Users\zhuxinyu> & C:/Users/zhuxinyu/AppData/Local/Programs/Python/Python312/python.exe c:/Users/zhuxinyu/Desktop/数模代码/投资(线性规划).py Traceback (most recent call last): File "c:\Users\zhuxinyu\Desktop\数模代码\投资(线性规划).py", line 37, in <module> res=linprog(c,A,b,Aeq,beq,bounds=bounds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog.py", line 649, in linprog lp, solver_options = _parse_linprog(lp, options, meth) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 1026, in _parse_linprog lp = _clean_inputs(lp._replace(A_ub=A_ub, A_eq=A_eq)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy\optimize\_linprog_util.py", line 462, in _clean_inputs raise ValueError( ValueError: Invalid input for linprog: unable to interpret bounds with this dimension tuple: (4, 2). PS C:\Users\zhuxinyu> & C:/Users/zhuxinyu/AppData/Local/Programs/Python/Python312/python.exe c:/Users/zhuxinyu/Desktop/数模代码/投资(线性规划).py Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 250, in _run_checked_subprocess report = subprocess.check_output( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 862, in callit func(*args) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\_backend_tk.py", line 274, in idle_draw self.draw() File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_tkagg.py", line 10, in draw super().draw() File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_agg.py", line 382, in draw self.figure.draw(self.renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 94, in draw_wrapper result = draw(artist, renderer, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\figure.py", line 3257, in draw mimage._draw_list_compositing_images( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\image.py", line 134, in _draw_list_compositing_images a.draw(renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axes\_base.py", line 3216, in draw mimage._draw_list_compositing_images( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\image.py", line 134, in _draw_list_compositing_images a.draw(renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axis.py", line 1405, in draw tlb1, tlb2 = self._get_ticklabel_bboxes(ticks_to_draw, renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axis.py", line 1332, in _get_ticklabel_bboxes return ([tick.label1.get_window_extent(renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 969, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 373, in _get_layout _, lp_h, lp_d = _get_text_metrics_with_cache( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 69, in _get_text_metrics_with_cache return _get_text_metrics_with_cache_impl( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 77, in _get_text_metrics_with_cache_impl return renderer_ref().get_text_width_height_descent(text, fontprop, ismath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_agg.py", line 211, in get_text_width_height_descent return super().get_text_width_height_descent(s, prop, ismath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backend_bases.py", line 566, in get_text_width_height_descent return self.get_texmanager().get_text_width_height_descent( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 363, in get_text_width_height_descent dvifile = cls.make_dvi(tex, fontsize) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 295, in make_dvi cls._run_checked_subprocess( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 254, in _run_checked_subprocess raise RuntimeError( RuntimeError: Failed to process string with tex because latex could not be found Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 250, in _run_checked_subprocess report = subprocess.check_output( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 862, in callit func(*args) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\_backend_tk.py", line 274, in idle_draw self.draw() File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_tkagg.py", line 10, in draw super().draw() File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_agg.py", line 382, in draw self.figure.draw(self.renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 94, in draw_wrapper result = draw(artist, renderer, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\figure.py", line 3257, in draw mimage._draw_list_compositing_images( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\image.py", line 134, in _draw_list_compositing_images a.draw(renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axes\_base.py", line 3216, in draw mimage._draw_list_compositing_images( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\image.py", line 134, in _draw_list_compositing_images a.draw(renderer) File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\artist.py", line 71, in draw_wrapper return draw(artist, renderer) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axis.py", line 1405, in draw tlb1, tlb2 = self._get_ticklabel_bboxes(ticks_to_draw, renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\axis.py", line 1332, in _get_ticklabel_bboxes return ([tick.label1.get_window_extent(renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 969, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 373, in _get_layout _, lp_h, lp_d = _get_text_metrics_with_cache( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 69, in _get_text_metrics_with_cache return _get_text_metrics_with_cache_impl( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\text.py", line 77, in _get_text_metrics_with_cache_impl return renderer_ref().get_text_width_height_descent(text, fontprop, ismath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backends\backend_agg.py", line 211, in get_text_width_height_descent return super().get_text_width_height_descent(s, prop, ismath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\backend_bases.py", line 566, in get_text_width_height_descent return self.get_texmanager().get_text_width_height_descent( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 363, in get_text_width_height_descent dvifile = cls.make_dvi(tex, fontsize) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 295, in make_dvi cls._run_checked_subprocess( File "C:\Users\zhuxinyu\AppData\Local\Programs\Python\Python312\Lib\site-packages\matplotlib\texmanager.py", line 254, in _run_checked_subprocess raise RuntimeError( RuntimeError: Failed to process string with tex because latex could not be found PS C:\Users\zhuxinyu>
最新发布
07-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值