Fail to install Python 2.7.9 on a Windows google compute engine instance

前端 未结 4 508
梦谈多话
梦谈多话 2021-01-05 15:17

I fired up a new Windows google compute engine instance. It\'s running Windows 2008 R2, service pack 1.

I download and try running the Python .msi installer for ver

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-05 16:14

    I'm using Windows 8.1 64-bit. I had 2.7.11 installed and then I tried to install PIP as well via Chocolatey PIP package.

    I think my installation had got messed up because I had tried to install Python 3.4 as well as Python 2.

    Then I had deleted all the Python 2 and Python 3 files in an attempt to get rid of this.

    What worked for me was:

    1. Editing the Environment Variables both, System and User to remove any PYTHONHOME or PYTHONPATH variables
    2. I also deleted the path I had to python2 in the PATH environment variable
    3. Now (as mentioned in Python Issue 22329) after deleting the Environment variables you can go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Repair' - this then worked as I would expect without error.
    4. Now finally I was able to go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Uninstall'.

    Edit: I assume this is connected with this PYTHON_HOME answer to a problem with Python 3.4

提交回复
热议问题