相关疑难解决方法(0)

如何在Windows 7的命令提示符中运行Python程序?

我试图弄清楚如何在Windows 7上使用命令提示符运行Python程序.(我现在应该已经弄明白了......)

当我在命令提示符下键入"python"时,出现以下错误:

'python'不被识别为内部或外部命令,可操作程序或批处理文件.

我在寻找帮助时找到的第一个地方是这个网站:http://docs.python.org/faq/windows.html#how-do-i-run-a-python-program-under-windows.

它有点帮助,但该教程是为Windows 2000及更早版本编写的,因此它对我的Windows 7机器的帮助微乎其微.我尝试了以下方法:

对于旧版本的Windows,最简单的方法是编辑C:\ AUTOEXEC.BAT>文件.您可能希望在AUTOEXEC.BAT中添加如下所示的行:

这个文件在我的机器上不存在(除非我弄错了).

接下来,我尝试了这个:(这里:我如何运行Python程序?)

把Python放在你的路上

视窗

为了运行程序,您的操作系统会在不同的位置查找,并尝试在此过程中将您键入的程序/命令的名称与某些程序相匹配.

在Windows中:

控制面板>系统>高级> |环境变量| >系统变量 - >路径

这需要包括:C:\ Python26; (或同等学历).如果你把它放在前面,那将是第一个看的地方.您也可以在最后添加它,这可能更安全.

然后重新启动提示,并尝试键入"python".如果一切正常,你应该得到一个">>>"提示符.

这对于Windows 7来说已经足够了,我开始使用系统变量.我添加了一个变量"python",其值为"C:\ Python27"

即使重新启动计算机,我仍然会收到错误消息.

有人知道怎么修这个东西吗?

python windows-7

157
推荐指数
5
解决办法
75万
查看次数

npm install 出现错误:`gyp` 失败,退出代码:1

我尝试使用 npm 5.6.0 在 Windows 10 上安装模块。当我输入 npm install 时,我得到:

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\xiaooming\Desktop\app\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xiaooming\\Desktop\\app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\xiaooming\Desktop\app\node_modules\node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp …
Run Code Online (Sandbox Code Playgroud)

windows node.js npm npm-install

32
推荐指数
6
解决办法
6万
查看次数

Testacular安装失败,没有vcbuild.exe

我正在尝试在Windows 8 Professional(64位)笔记本电脑上安装Testacular(使用nmp),但是当它尝试安装socket.io作为此过程的一部分时失败.我得到的错误是

Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual 
Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.
Run Code Online (Sandbox Code Playgroud)

我显然安装了.NET framework 3.5(它在控制面板中的添加/删除Windows组件位下检查),虽然我没有设法找到vcbuild.exe.我尝试安装VS2005的旧副本,但这导致了一个关于无效项目(.vcproj)文件的不同错误.

任何人都可以建议我如何让这个工作?奇怪的是,它在我的工作计算机上安装得很好,这与它不会安装的计算机非常相似(它们都是64位Win 8 Pro).

vcbuild npm socket.io windows-8 karma-runner

19
推荐指数
2
解决办法
2万
查看次数

错误MSB3411:无法使用Visual C++组件"VCBuild.exe"

我有Visual Studio 2010 SP1和Windows sdk 7.1.我还有VS2012和Windows套件8.

当我运行Windows SDK 7.1 Command Prompt并运行node-gyp build --msvs_version=2010它给我错误:

error MSB3411: Could not load the Visual C++ component "VCBuild.exe". 
If the component is not installed,
either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Fr
amework 3.5, or 2) install Microsoft Visual Studio 2008.
Run Code Online (Sandbox Code Playgroud)

它是否正在尝试查找VCBuild.exe.

我发现vcbuild已被msbuild取代.

这是一个有效的错误吗?

我还发现在Windows 7中,对于.NET 3.5,您只需要从控制面板打开它.关于stackoverflow的其他问题,请看这里这个.

但问题是,由于vcbuild.exe在vs2010系统中不存在,那么为什么node-gyp正在搜索它?或者我错过了什么?

我该如何解决这个错误?

msbuild visual-studio-2010 node-gyp

12
推荐指数
3
解决办法
3万
查看次数

链接:致命错误LNK1181:无法打开输入文件'C:\ OpenSSL-Win64\lib\libeay32.lib'

我有Windows 7 - 64位与Visual Studio 2013终极版.我正在运行npm install命令并获得以下错误:

npm info it worked if it ends with ok
npm info using npm@3.8.3
npm info using node@v5.10.0
npm info attempt registry request try #1 at 10:01:07 AM
npm http request GET http://registry.npmjs.org/fsevents
npm http 304 http://registry.npmjs.org/fsevents
npm info attempt registry request try #1 at 10:01:09 AM
npm http request GET http://registry.npmjs.org/ursa
npm http 304 http://registry.npmjs.org/ursa
npm info lifecycle ursa@0.9.4~preinstall: ursa@0.9.4
npm info linkStuff ursa@0.9.4
npm info lifecycle ursa@0.9.4~install: ursa@0.9.4

> ursa@0.9.4 install C:\Users\sudhir_kumar05\mockingbird\node_modules\ursa …
Run Code Online (Sandbox Code Playgroud)

intellij-idea visual-studio-2013 npm-install

7
推荐指数
2
解决办法
1万
查看次数

在Windows 7上为phantomjs安装"弱"模块时,node-gyp重建失败

我正在尝试在Windows 7(64位)计算机上安装phantomjs-node模块.安装"弱"模块时似乎存在node-gyp重建错误.

我遵循了node-gyp windows安装步骤,确保我安装了python并正确设置了路径.

我还有visual c ++和node-gyp所需的其他要求.遗憾的是,我无法修复node-gyp重建错误.

我安装了以下内容

  • 节点 - 0.8.14(64位)
  • python - 2.7.3(64位)
  • Microsoft Visual C++ 2010(64位,也安装了32位以防万一,因为64位没有帮助)
  • Visual Studio 2010(专业版)和Visual Studio 2012(快递,包括Web和桌面)
  • Windows SDK 7.1

我在安装模块时遇到的错误是:

C:\ Program Files(x86)\ MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7):错误MSB8007:项目'weakref.vcxproj'的平台无效.平台="64".您可能会看到此消息,因为您正在尝试构建没有解决方案文件的项目,并且已指定了此项目不存在的非默认平台.

我遇到了上述问题,尝试了所有链接并正确安装了所有node-gyp要求.非常感谢.

node.js npm node-gyp

2
推荐指数
1
解决办法
3688
查看次数