Getting the targetdir variable must be provided wh

2019-04-04 23:18发布

问题:

I have Python 2.7 on my Window 7. Problem is with python 3.5 and 3.6 version only.

回答1:

Hey just right click on exe file and run as a administrator.It worked for me :)



回答2:

There are 2-3 ways to solve the issue:

  1. As suggested above, Right-click on exe file and run as administrator.

  2. Open command prompt in administrator mode. Just take a note of where your setup file location is present. Use cd C:\Users\ABC\Downloads

Type C:>python-3.7.0.exe TargetDir=C:\Python37

Note: my setup file was python-3.7.0.exe Follow the steps

3.Please try to do the custom installation and choose a clean folder location. In custom installation, we can tick or un-tick some option. Choose only 1/2 option which are required. Leave rest. Sometimes this troubleshoot step also help to install.

4.Go to properties of python Setup file. Go to advance setting and change the owner to administrator. Also go to compatibility and tick on "Run as administrator"