【问题标题】:npm config get python path differs from executable path, Symbols changednpm config get python 路径与可执行路径不同,符号已更改
【发布时间】:2020-01-16 01:01:27
【问题描述】:
gyp ERR! find Python checking Python explicitly set from command line or npm configuration
gyp ERR! find Python - "--python=" or "npm config get python" is "C:\Users\Kolmipyöräinen pyörä\.windows-build-tools\python27\python.exe"
gyp ERR! find Python - executable path is "C:\Users\Kolmipy�r�inen py�r�\.windows-build-tools\python27\python.exe"
gyp ERR! find Python - "C:\Users\Kolmipy�r�inen py�r�\.windows-build-tools\python27\python.exe" could not be run

当尝试npm install openvpn-bin 时,它获取了python 路径,但将Kolmipyöräinen pyörä 更改为Kolmipy�r�inen py�r� 并且无法执行。

【问题讨论】:

  • 您是直接从命令行还是从批处理文件运行npm 命令?因为如果是在脚本文件中,问题很可能是脚本文件保存时使用了错误的编码。
  • 编码如utf-8 utf-16。 latin-1等。
  • 我尝试从 cmd 运行并形成 vsc,管理模式和普通 @grismar。我可以使用 utf-8 作为 --encoding:"utf-8" 样式吗?

标签: python node.js npm path


【解决方案1】:

您可以尝试将路径名称更改为英文。可能它无法识别“Kolmipyöräinen pyörä”。

【讨论】:

  • 这很可能是问题所在,但您可以想象这不仅仅是发生这种情况的地方,因此在 npm install 上实现编码选项的方法将是 gr8
  • 嘿 - 这是一个很好的第一次尝试答案;可悲的是,它并没有通过明确的解决方案解决问题,只是提出了一种可能的解决方法。一个好的答案应该解决所提出的问题(而不是症状),并且知道对你有用。我希望您继续成长并为社区做出贡献。
猜你喜欢
  • 2020-01-10
  • 1970-01-01
  • 1970-01-01
  • 2012-01-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多