請問各位大大
import cx_Oracle 時出現下列錯誤訊息,請問該如何處理?
Python 3.9 (64-bit) 互動視窗 [PTVS 16.11.21196.2-16.0]
鍵入 $help 可取得命令清單。
import cx_Oracle
Error using selected REPL back-end:
Traceback (most recent call last):
File "c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\python\core\ptvsd_repl_launcher.py", line 81, in _run_repl
backend_type = getattr(import(backend_mod_name, fromlist=['*']), backend_name)
File "c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\python\core\ptvsd\repl\ipython.py", line 49, in
from .ipython_client import IPythonBackend, IPythonBackendWithoutPyLab
File "c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\python\core\ptvsd\repl\ipython_client.py", line 31, in
from base64 import decodestring
ImportError: cannot import name 'decodestring' from 'base64' (C:\Users\joylin\AppData\Local\Programs\Python\Python39\lib\base64.py)
Using standard backend instead
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'cx_Oracle'
Dears,
2個方向除錯
For ModuleNotFoundError
python -m pip install cx_Oracle
For Visual Studio Code Interpreter
Step 1.
Step 2.
Step 3.
根據你自己的狀況進行調整喔。