我正在尝试在项目中运行from tkinter import *
root = Tk()
L1 = Label(root, text="Username")
L2 = Label(root, text="Password")
E1 = Entry(root)
E2 = Entry(root)
L1.grid(row=0, sticky=E)
L2.grid(row=1, sticky=E)
E1.grid(row=0, column=1)
E2.grid(row=1, column=1)
B1 = Button(root, text="Login")
B1.grid(columnspan=2)
root.mainloop()
命令,但命令失败,报告了不兼容的Node版本。
奇怪的是,我的yarn
版本是node
,而不是Yarn`报告的12.7.0
。
这是怎么回事?
注意:我使用的是Ubuntu 18.04 LTS,该版本已经过时的Node版本,但是我使用NVM将其更新为12.7.0。
13.0.0-nightly2019072543e5478e2f
$ yarn
yarn install v1.17.3
warning You are using Node "13.0.0-nightly2019072543e5478e2f" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
error xmlbuilder@9.0.7: The engine "node" is incompatible with this module. Expected version ">=4.0". Got "13.0.0-nightly2019072543e5478e2f"
error Found incompatible module.
$ node --version
v12.7.0
$ nvm list