python安装出错运行不了_关于python:安装和运行pywin32 2.7时出错

This seems to happen if User Access Control (UAC) is disabled - is it

disabled for you?

无论哪种方式,尝试运行"python scripts pywin32_postinstall.py -install"

从安装目录的根目录,事情应该完成注册

- 这应该修复你看到的下一个错误。

BLOCKQUOTE>

这对我来说很好。

运行此安装后脚本为我工作,因为"以管理员身份运行"提示失败。谢谢

您不能以管理员身份安装,请参阅此错误报告:

This is maybe because you are running Windows under the"Administrator" account and anything you normally run is equal to a"run as Administrator"

And paradoxically running the installation of pywin32 on Windows 7 as Administrator causes this error.

So a workaround is to create another admin account

net user Admin /add

net user Admin

net localgroup Administrators Admin /add

and then run the pywin32 installation with

runas /user:Admin pywin32-217.win32-py2.7.exe

尽管看起来很奇怪,但这种解决方法很有效!

也为我工作,只需要为帐户设置密码(可以通过计算机管理完成)。

对!这非常有效 - 只是不要忘记设置密码或者您可能会收到错误:"1327:登录失败:用户帐户限制。可能的原因是不允许使用空白密码,登录时间限制或策略限制已被强制执行。"哈哈,猜猜我怎么知道...... :-)

哦,这看起来很明显,但请记住你的pywin文件可能不一样,所以最后一行可能会有所不同。例如,我的是:runas / user:Admin pywin32-219.win-amd64-py2.7.exe

这是惊人的。我实际上没有以管理员身份登录但仍然遇到此错误。但是,一旦我使用我的当前帐户运行runas,它就可以了。

这些解决方案都没有帮助我(坐在Windows 10上)。

但是当我运行c: python27 scripts pywin32_postinstall.py -install时,我终于修复了它

安装完成后,您可以尝试再次运行安装程序,以确保为我工作。

因此我得了ImportError: DLL load failed: The specified module could not be found

我正在使用Windows 10 btw。我在以前的Windows版本中没有遇到此问题

运行c: python27 scripts pywin32_postinstall.py -install你的意思是什么?

从PowerShell command as admin运行在Windows 10上为我工作,其中Command line prompt (as admin)失败。

我遇到了与作者相同的问题。我使用Tim Golden python工作人员的脚本来打印文本文件。运行后,出现以下错误:

pywintypes.error:(31,'ShellExecute','连接到系统的设备无法运行。')

我的系统是Windows 7,64位。 python是python2.7 64位。

我认为该错误与pywin32的安装或Windows系统设置无关。我想原因是默认打开软件设置为.txt文件。因为我将默认打开软件从Nodepad ++更改为记事本后,我可以在我的Hp打印机上打印该文件。

同样的事情,如果默认应用程序是记事本而不是记事本++ Tims脚本工作得很好。

我用这个解决了它:

1pip install pypiwin32

我通过以管理员身份运行安装程序文件来安装pywin32-219.win-amd64-py2.7.exe时遇到了同样的问题。

一旦我通过简单地执行文件(双击它)安装它,我没有再遇到这个问题。

我在Windows 7 64位SP1上使用Python 2.7.9(64位)

但是,我确实注意到一个奇怪的事情,如果我只是双击安装程序exe,它需要稍微超过20秒才能显示我是否要运行exe文件,而如果以管理员身份运行文件,它发生在那时(没有等待那么久)

我使用的是120 GB SSD,因此在这种情况下无法质疑硬盘的速度。

无论如何,这是在我的情况下成功安装pywin32之后的输出:

1

2

3

4

5

6

7

8

9

10

11

12

13Copied pythoncom27.dll to C:\Windows\system32\pythoncom27.dll

Copied pythoncomloader27.dll to C:\Windows\system32\pythoncomloader27.dll

Copied pywintypes27.dll to C:\Windows\system32\pywintypes27.dll

Registered: Python.Interpreter

Registered: Python.Dictionary

Registered: Python

-> Software\Python\PythonCore\2.7\Help[None]=None

-> Software\Python\PythonCore\2.7\Help\Pythonwin Reference[None]='C:\\Python27\\Lib\\site-packages\\PyWin32.chm'

Pythonwin has been registered in context menu

Creating directory C:\Python27\Lib\site-packages\win32com\gen_py

Shortcut for Pythonwin created

Shortcut to documentation created

The pywin32 extensions were successfully installed.

安装pywin32的步骤 -

净用户管理员/添加

净用户管理员

net localgroup管理员管理员/添加

runas / user:Admin pywin32-217.win32-py2.7.exe

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值