错误2:没有此类文件或目录未找到解决方案

2024-06-03 14:02:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我知道这个问题以前已经被回答过很多次了,我尝试应用所有的解决方案,但仍然得到一个错误-

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]没有这样的文件或目录

还有,当我说pip show autopep8时,它给了我下面的信息- 版本:1.5.4 概要:一个自动格式化Python代码以符合PEP8样式指南的工具 主页:https://github.com/hhatto/autopep8 作者:Hideo Hattori 作者电邮:hhatto。jp@gmail.com 执照:外籍人员执照 位置:c:\users\joshi\appdata\roaming\python\python37\site软件包 需要:pycodestyle,toml 要求: (基础


Tags: 文件comlocal错误作者解决方案exeusers
1条回答
网友
1楼 · 发布于 2024-06-03 14:02:31

基于this,您可以尝试:

  1. Uninstall Python extension (if you have pylance uninstall it first).
  2. Close all instances of VS Code.
  3. Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.
  4. Delete any folder with the name starting with ms-python.python*
  5. Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).

相关问题 更多 >