让 ActivePython 与 WSH 一起工作 [英] Getting ActivePython to work with WSH

查看:59
本文介绍了让 ActivePython 与 WSH 一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 ActivePython 2.7.2 并且我正在尝试通过带有 wscript/cscript 的控制台执行 .pys 脚本,[即Microsoft 的 WSH(Windows 脚本主机)中的 ActivePython(带有 .pys 扩展名的 PythonScript)] 并且在尝试使用 wscript 时出现两个错误.

I've installed ActivePython 2.7.2 and I'm trying to execute a .pys script via the console with wscript/cscript, [i.e. ActivePython (PythonScript with .pys extension) in Microsoft's WSH(Windows Scripting Host)] and when trying with wscript I get two errors.

  1. 程序无法启动,因为您的计算机缺少 MSVCR90.dll,请尝试重新安装程序以解决此问题"
  2. "找不到脚本的脚本引擎 Python

我进行了一些谷歌搜索,并从这里下载并安装了 Microsoft Visual C++ Redistributable Package (x86):http://www.microsoft.com/download/en/confirmation.aspx?id=29 无济于事.

I did some googling and have also downloaded and installed the Microsoft Visual C++ Redistributable Package (x86) from here: http://www.microsoft.com/download/en/confirmation.aspx?id=29 to no avail.

我试过'pythonw c:\Python27\Lib\site-packages\win32comext\axscript\client\pyscript.py'注册python.

I've tried 'pythonw c:\Python27\Lib\site-packages\win32comext\axscript\client\pyscript.py' to register python.

任何帮助将不胜感激.

我在 Win7 x86 上运行.

I'm running on Win7 x86.

推荐答案

要解决这个问题:

  1. 为 Windows 扩展安装 Python (PyWin32)
  2. 注册python,C:\YourPythonVersion\Lib\site-packages\win32comext\axscript\client\pyscript.py

这篇关于让 ActivePython 与 WSH 一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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