【发布时间】:2020-01-26 06:31:16
【问题描述】:
在我的 VS Code 中,我运行了 Python 扩展,安装了 Python 3.6.1 和 Anaconda3。当我复制并粘贴一些代码时,VS Code 要求我安装 autopep8。当我按“是”时,它会显示一个框 。
首先我选择了“使用 Conda 安装”。接下来,弹出以下错误消息,无法正确安装 autopep8:
PS D:\Python> conda activate base
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- cmd.exe
- fish
- tcsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
PS D:\Python> & conda install --name base autopep8
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
'https://repo.anaconda.com/pkgs/main/win-64'
我不明白消息的含义。谁能帮帮我?
【问题讨论】:
标签: python visual-studio-code anaconda conda