Traceback (most recent call last):
File "D:\Trading Strategy_EX\Chapter2\stock_list.py", line 44, in
x.to_excel('D:\Trading Strategy_EX\Chapter2\stock_list.xlsx')
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\util_decorators.py", line 333, in wrapper
return func(*args, **kwargs)
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 2417, in to_excel
formatter.write(
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\excel.py", line 943, in write
writer = ExcelWriter(
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\excel_openpyxl.py", line 57, in init
from openpyxl.workbook import Workbook
ModuleNotFoundError: No module named 'openpyxl'
執行stock_list.py寫出Excel出現以下問題 (D:\Trading Strategy_EX\Chapter2\是存在的,但沒有產生Excel) ,請幫忙解惑,感謝!
Traceback (most recent call last): File "D:\Trading Strategy_EX\Chapter2\stock_list.py", line 44, in
x.to_excel('D:\Trading Strategy_EX\Chapter2\stock_list.xlsx')
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\util_decorators.py", line 333, in wrapper
return func(*args, **kwargs)
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 2417, in to_excel
formatter.write(
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\excel.py", line 943, in write
writer = ExcelWriter(
File "C:\Users\Austin\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\excel_openpyxl.py", line 57, in init
from openpyxl.workbook import Workbook
ModuleNotFoundError: No module named 'openpyxl'
Austin