【发布时间】:2022-01-13 00:11:01
【问题描述】:
我试图在 VS 代码中为 python 安装格式化程序,当编辑器尝试安装格式化程序时,我收到以下错误:
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\\Python310\\Scripts\\black.exe' -> 'C:\\Python310\\Scripts\\black.exe.deleteme
整个终端会话:
PS D:\playarea> & C:/Python310/python.exe -m pip install -U black
Collecting black
Downloading black-21.12b0-py3-none-any.whl (156 kB) |████████████████████████████████| 156 kB 469 kB/s---------------------------- Requirement already satisfied: platformdirs>=2 in c:\users\youse\appdata\roaming\python\python310\site-packages (from
black) (2.4.0)
Collecting tomli<2.0.0,>=0.2.6
Downloading tomli-1.2.2-py3-none-any.whl (12 kB)
Collecting pathspec<1,>=0.9.0
Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting typing-extensions>=3.10.0.0
Downloading typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Downloading click-8.0.3-py3-none-any.whl (97 kB)
gic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\\Python310\\Scripts\\black.exe' -> 'C:\\Python310\\Scripts\\black.exe.deleteme'
重要提示:我应该注意我那天早些时候正在学习虚拟环境,并且我玩了很多关于 python 解释器应该与代码使用,但是,我不明白哪里错了?
【问题讨论】:
标签: python python-3.x visual-studio-code