简体   繁体   中英

I get python errors with installing pre-requisites onto a node.js project

I am installing all the packages needed in a node.js project I downloaded and I am getting a ton of errors that I have no idea how to resolve them. It seems to be involved with getting python to run. I have both 2.7 and 3.3 on my computer.

Here are some images of the errors

错误1错误2

The issue is that Python 2.7 is either not on your PATH or else is after Python 3.3. You can solve this problem by either:

  • Passing the path to Python 2.7 using the --python flag (as it states in the error) or
  • By adding the path to Python 2.7 (C:\\Python27, most likely) to your PATH (or by moving it before C:\\Python33 in the list).

You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0

Did you try that?

The problem here is that apparently to build that module, Python 2 is required, but your standard Python executable in the PATH is the Python 3 executable.

Other than that, it might be a good idea to ask the module maintainer to upgrade his build process to support Python 3 too.

如果python2在您的路径中(适用于许多linux设置) npm install node-gyp-package --python=python2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM