'Access is denied' while i am running a command in powershell

Pranav Ravuri 21 Reputation points
2020-06-05T09:39:28.927+00:00

Hi, I am new to the powershell so this might be an easy question. I am trying to make a python 3.7 virtual environment using virtualenv. to give you a context in already have python 3.8 in my laptop what is also added to the path variable but python 3.7 is not added to the path variable while installation. the command I ran was but I am getting 'Access is denied' error can anyone help.
PS D:\Pranav\Software Output\Python> virtualenv --python="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.7" p37\env1
RuntimeError: failed to query C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.7 with code 13 err: 'Access is denied'

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,127 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. T. Kujala 8,701 Reputation points
    2020-06-05T11:07:43.567+00:00

    Have you verified that you run the command as administrator?

    You can also check that you have enough rights to the target (D:\Pranav...}

    9155-runas-ps.jpg

    1 person found this answer helpful.