I installed python 3.11 from microsoft store, instaled visual studio code and python extension. But when I try to run "hello world" vsc says that "python is not installed" and shows warning: Identifier for virt-virtualenv failed to identify. When I manually select enter path to python 3.11 it doesn’t work and system shows this: "system cannot get access to this file".
I tried reinstalling everything and installing in different ways, from different sources and nothing helps.
I again tried installing python (this time once againt from python.org), and this time I can select interpreter, but when I try to run python file I get this:
PS C:UsersŁukasz> & C:/Users/Łukasz/AppData/Local/Programs/Python/Python311/python.exe Untitled-1
C:UsersŁukaszAppDataLocalProgramsPythonPython311python.exe: can’t open file ‘C:UsersŁukaszUntitled-1’: [Errno 2] No such file or directory
PS C:UsersŁukasz>
3
Answers
if VS Code doesn’t work, try installing IDLE from python.org. If you want to use vs code, use select interpreter and select (one of) the options. To do select interpreter, click on the search bar thing near the top(image attached) and click on show and run commands and then select interpreter image
python --version
try using brew install python if you have homebrew, otherwise run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
then brew install python.