[英]Python: “OSError: [Errno 2] No such file or directory:”… with the file it found?
[英]ErrNo 2: No such file or directory - no solution found
我知道這個問題之前已經回答過很多次,我嘗試應用所有解決方案但仍然出現錯誤 -
C:\Users\joshi\AppData\Local\Programs\Python\Python39\python.exe: 無法打開文件'C:\Users\joshi\Desktop\Usersjoshi.vscodeextensionsms-python.python-2021.3.680753044pythonFilespyvsc-run- isolated.py': [Errno 2] 沒有這樣的文件或目錄
also when I say pip show autopep8 - it gives me below message - Version: 1.5.4 Summary: A tool that automatically formats Python code to conform to the PEP 8 style guide Home-page: https://github.com/hhatto/ autopep8作者:Hideo Hattori 作者電子郵件:hhatto.jp@gmail.com 許可證:外籍許可證位置:c:\users\joshi\appdata\roaming\python\python37\site-packages 要求:根據
基於此,您可以嘗試:
- 卸載 Python 擴展(如果你有 pylance 先卸載它)。
- 關閉 VS Code 的所有實例。
- Go 到,%USERPROFILE%/.vscode/extensions(在 Windows 上)或 ~/.vscode/extensions 在 Linux/Mac 上。
- 刪除名稱以 ms-python.python* 開頭的任何文件夾
- 啟動 VS Code,然后安裝 Python 擴展(如果您在步驟 1 中卸載了它,也可以安裝 pylance)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.