【问题标题】:Python3: ValueError: invalid variable 'py_version_nodot_plat'Python3:ValueError:无效变量'py_version_nodot_plat'
【发布时间】:2022-01-25 01:26:24
【问题描述】:

我正在尝试在 cmd/windows10 上安装这个库:

py -m pip install PyExecJS

我收到了这条消息,

ERROR: Command errored out with exit status 1: 'C:\Program Files\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Castel\\AppData\\Local\\Temp\\pip-install-olb4pmo_\\pyexecjs_d890f61241754a86b05696cc575c0ff6\\setup.py'"'"'; __file__='"'"'C:\\Users\\Castel\\AppData\\Local\\Temp\\pip-install-olb4pmo_\\pyexecjs_d890f61241754a86b05696cc575c0ff6\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Castel\AppData\Local\Temp\pip-record-hnlq7en9\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Castel\AppData\Roaming\Python\Python310\Include\PyExecJS' Check the logs for full command output.

请在此处阅读完整的错误消息:

https://pastebin.com/BeSV9Fyz

【问题讨论】:

  • 尝试先用pip install wheel 安装轮子,然后再用PyExecJS。另外,你确定这在 3.10 中受支持吗?

标签: python python-3.x pip


【解决方案1】:

我通过安装这个解决了这个问题:

py -m pip install --upgrade pip setuptools wheel

python3 -m pip install --upgrade pip setuptools wheel

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多