简体   繁体   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. 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. However, choosing C:\cygwin\python2.7.exe does work.但是,选择 C:\cygwin\python2.7.exe 确实有效。

I belive VSCode is up to date (not exactly sure how to check).我相信 VSCode 是最新的(不完全确定如何检查)。

python3 --version
Python 3.8.3

python --version
Python 2.7.18

Anyone have a similar issue?有人有类似的问题吗? Thanks!谢谢!

Try to run python3 in the cmd window to check whether it can be used normally, if it works, then you could try the following:尝试在cmd window中运行python3查看是否可以正常使用,如果可以,可以尝试以下方法:

  1. Check python environment variables, refer to: environment variables .检查 python 环境变量,参考:环境变量

  2. Check the python path setting in VSCode, refer to: pythonPath .检查VSCode中的python路径设置,参考: pythonPath

  3. Try to create a virtual environment and check whether you could use python3 successfully.尝试创建一个虚拟环境并检查您是否可以成功使用python3。 Reference: virtual environment .参考: 虚拟环境

If it still doesn't work, providing more relevant setting information will solve it better.如果还是不行,提供更多相关的设置信息会更好的解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM