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>
最新发布