簡體   English   中英

VScode 不會讓我 select cygwin python3 解釋器

[英]VScode wont let me select cygwin python3 interpreter

When selecting a python interpreter in VScode I navigate to C:\cgywin64\python3.8.exe and VScode allows me to select this file, but after choosing it VScode continues to tell me I need to select a Python interpreter. 但是,選擇 C:\cygwin\python2.7.exe 確實有效。

我相信 VSCode 是最新的(不完全確定如何檢查)。

python3 --version
Python 3.8.3

python --version
Python 2.7.18

有人有類似的問題嗎? 謝謝!

嘗試在cmd window中運行python3查看是否可以正常使用,如果可以,可以嘗試以下方法:

  1. 檢查 python 環境變量,參考:環境變量

  2. 檢查VSCode中的python路徑設置,參考: pythonPath

  3. 嘗試創建一個虛擬環境並檢查您是否可以成功使用python3。 參考: 虛擬環境

如果還是不行,提供更多相關的設置信息會更好的解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM