解决Windows上的Python 3.4安装问题 [英] Solving install issues with Python 3.4 on Windows

查看:450
本文介绍了解决Windows上的Python 3.4安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试在系统上安装Python 3.4作为替代安装,以试图在迁移代码之前熟悉自己.我的主要Python安装是2.7.6.

I have recently tried to install Python 3.4 as an alternative installation on my system in an attempt to familiarise myself before migrating code. My main Python installation is 2.7.6.

我尝试了Windows的64位安装程序,但出现错误消息

I tried the 64 bit installer for Windows, but it came up with an error message

此Windows Installer软件包有问题.作为安装程序一部分运行的程序未按预期完成.请与您的支持人员或包装供应商联系.

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

此后,安装将回滚(如下所示):

After this the install is rolled back (from the point shown below):

我最终在下面找到了解决此问题的方法,并决定共享,以防其他人遇到相同的问题.

I have eventually found a solution to this posted below and decided to share in case anyone else was having the same issue.

推荐答案

在网上看了一眼后,我发现了(这里),该问题与pip安装冲突有关(我已经为Python 2.7安装了一个版本,显然与Python 3.4附带的版本不兼容.

After some looking online I found (here) that the issue was related to conflicting pip installs (I have a version already installed for Python 2.7 and apparently this is not compatible with the version that ships with Python 3.4.

要解决此问题,我只是从下面显示的安装选项中取消选择了pip,安装顺利进行:

To get around this issue I simply de-selected pip from the install options shown below and the install went ahead smoothly:

再次运行安装程序,然后选择PIP安装.

Run installer again and select PIP installation.

如果PIP安装失败并出现相同的错误,则可能要使用 http://eveditor之类的工具检查环境变量.com/,可以检查它们是否有效.如果以前安装了其他版本,则很可能是错误的PYTHONHOME和PYTHONPATH变量.通过将它们设置为相关路径来修复它们.例如PYTHONHOME = C:\ python27和PYTHONPATH = c:\ python27 \ Lib

If the PIP fails to install with the same error, you may want to check environmental variables using a tool like http://eveditor.com/ which enables to check whether they are valid. If you had another version installed before, you most likely have wrong PYTHONHOME and PYTHONPATH variables. Fix them by setting them to relevant paths. e.g. PYTHONHOME=C:\python27 and PYTHONPATH=c:\python27\Lib

您将可以运行并安装PIP.

You will then be able to run and install PIP.

这篇关于解决Windows上的Python 3.4安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆