1.Could not determine npm prefix: [WinError 2] 系统找不到指定的文件。

找到anaconda\Lib\site-packages\jupyter_lsp文件夹下的types.py,以管理员身份打开,修改

def _npm_prefix(self):
    try:
        return (
            subprocess.run(["npm.cmd", "prefix", "-g"], check=True, capture_output=True)
            .stdout.decode("utf-8")
            .strip()
        )
    except Exception as e:  # pragma: no cover
        self.log.warn(f"Could not determine npm prefix: {e}")

即将“. cmd”添加到npm:错误不是说找不到前缀,而是它一开始就无法调用npm

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐