我在 VS Code 上收到此消息"Python is not installed. Please download and install python before using the extension."
也没有*"Python Interpreter"*
选择。当我点击它时,它显示为空。
我有Python
and Python extension
安装了,我确实有virtual environments
设置在Anaconda navigator
但由于某种原因,我无法使用它们。我尝试了很多方法,例如重新安装 Python、Anaconda 和 VS Code 以及 VS Code 的 Python 扩展,但并没有解决问题。可能是什么原因?
我还附上了 VS Code 的屏幕截图。请点击这里查看截图 https://i.stack.imgur.com/T1r2W.png
感谢您的帮助。
我曾经遇到过类似的问题,我发现默认情况下 vs code 会查找 /usr/bin/python 但在某些情况下在 linux 和 mac 上路径是 /usr/bin/python3 或 2 ,所以你可以通过声明 python3 来修复它作为默认版本。
打开终端并输入以下命令
sudo apt install python-is-python3
使用 - 检查安装情况
python --version
它应该给出输出 3.x.x
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)