7

I am trying to install Python 2.7 (64 bit) on Windows 10. In the middle of the installation, a window pops up saying:

Error writing to file C:\Python27\pythonw.exe. Verify that you have access to that directory

How can I resolve this issue and install Python?

screenshot

1
  • 1
    I haven't used Windows 10 enough to be confident about posting this as an answer, but you may need to run the installer in an administrator mode. It looks like something went wrong right at the beginning of the installation, and all versions of windows are a little protective of the c root directory - I imagine Windows 10 may be more protective of it. Commented Feb 7, 2016 at 11:01

5 Answers 5

22

This error is normally encountered when the installer does not have admin rights for the drive/folder you are installing to. I also noticed that you are installing to drive C:

Here are a couple of things for you to try.

Open the installer program by right-clicking, and then selecting "Run as Administrator".

Depending on how you have your PC set up you may not have permission to install on drive C:

If this is a work computer, talk to your IT department. Otherwise, seriously consider using different drives to keep your OS and your applications separated.

Sign up to request clarification or add additional context in comments.

2 Comments

I am able to install all other software, also python 3, but I am not able to install python 2.7. @Starcky
Thanks Stracky. Running as administrator solved my problem.
2

I encountered a similar issue while installing Python 2.7.11 on Windows 7 (64bit). Here is how I solved the error.

  1. Note down the path mentioned in the error.

  2. Do not close the error message. i.e. Do not press "Retry" or "Cancel", let it be there.

  3. Go to the directory mentioned in step-1.

  4. Try to create a new folder or text file in this directory.

  5. You will get an error message saying "The Disc Structure is Corrupted and Unreadable". This is the real issue which is causing the Python installation to fail.

  6. Run Command Prompt as an administrator and enter the command: Chkdsk \f C:

  7. Either it will start checking the disc or it will ask you to select if you want to check disc next time you boot-up your machine. Select Yes and restart your machine.

  8. A disc check will be performed, which may take 5-10 minutes.

  9. Now you can install Python without any issue.

Comments

2

I had the same problem , this is how I solved the error :

  1. click on cancel
  2. go to c:\
  3. create a new folder and call it python or python3
  4. run the python install as administrator and choose the new folder that you just created as directory where it should be installed

  5. et voila !

Comments

0

Your Windows 10 version may not be activated. So many administrator features are locked in inactivated Windows10 version.

So try to open CMD in administrator mode and run following command to ignore the activation message.

slmgr -rearm

Now you can install fresh version of python with pythonw.exe features.

Comments

0

Right Click The running Uninstaller. Then Right Click Python 3.9.1 64-bit as shown below in the picture. ( I have Python 3.9.1. You can do it in any Uninstaller) Now it will repair without any errors. ^_^

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.