警告:';as';将成为Python 2.6中的保留关键字

警告:';as';将成为Python 2.6中的保留关键字,python,npm,reserved-words,Python,Npm,Reserved Words,在运行npm安装(例如)时,我遇到以下错误: /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py:852: Warning: 'as' will become a reserved keyword in Python 2.6 Traceback (most recent call last): File "/usr/local/lib/node_modules/npm/node_module

在运行npm安装(例如)时,我遇到以下错误:

/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py:852: Warning: 'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 15, in <module>
    import gyp
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 8, in <module>
    import gyp.input
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 852
    except ImportError as e:
                        ^
SyntaxError: invalid syntax
/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/input.py:852:警告:“as”将成为Python 2.6中的保留关键字
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/gyp”,第15行,在
进口石膏
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/uuu init_uuuuuuu.py”,第8行,在
导入gyp.input
文件“/usr/local/lib/node_modules/npm/node_modules/node gyp/gyp/pylib/gyp/input.py”,第852行
除e以外:
^
SyntaxError:无效语法

python——版本生成“Python2.7.1”

这在Python2.7.1中不是语法错误。一个快速的解决方法是以
python/full/path/to/scriptname.py
的形式运行该程序,它实际上将使用python 2.7.1。

感谢您的反馈,但该代码嵌入到从internet加载文件的package.json文件中。有没有关于如何推广Python2.7.1使用的线索?