【环境配置】Windows10系统下VSCode和Anaconda的配置和安装

 一、安装Anaconda

 

 

解决anaconda安装时候报错

win10 环境安装的anaconda3,在通过pycharm导入虚拟环境或者执行conda更新命令的时候出现ssl错误报错如下:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/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.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/pkgs/free/win-64/current_repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

 解决方法:

Try copying these files from Anaconda3/Library/bin to Anaconda3/DLLs :
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll

 翻译过来就是:

把路径“Anaconda3/Library/bin ”下面的文件复制到路径“Anaconda3/DLLs”下 :
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll

  

 二、安装vscode

 

 

 

 三、在vscode中设置虚拟环境

  Ctrl+shift+P打开首选项,设置虚拟环境

    

  将pythonPath改为虚拟环境的路径,例如我的虚拟环境名称为“tensorflow”

 "python.pythonPath": "D:\\Anaconda3\\envs\\tensorflow"

 

     "python.pythonPath""D: \\ Anaconda3 \\ envs \\ tensorflow"
 

猜你喜欢

转载自www.cnblogs.com/saiminhou/p/12164109.html