skip to Main Content

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


  1. 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

    Login or Signup to reply.
    1. To the left of visual studio code, check for the recommended extensions and install them
    2. Open terminal and confirm that you have python install using the command python --version
    3. Check the bottom right of your vscode and see what language it is shown (it should be showing python)
    4. Maybe the problem is with the virtual environment you selected (or that was automatically assigned).
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search