【環境配置】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"
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM