在虚拟环境中使用 heroku open 命令时,报错:No module named '_tkinter'
输入:heroku open
(ll_env)F:\learning_log>heroku open
报错:No module named '_tkinter'
ModuleNotFoundError at /
No module named '_tkinter'
Request Method: GET
Request URL: https://*.herokuapp.com/
Django Version: 2.2.28
Exception Type: ModuleNotFoundError
Exception Value:
No module named '_tkinter'
Exception Location: /app/.heroku/python/lib/python3.9/tkinter/init.py in , line 37
Python Executable: /app/.heroku/python/bin/python
Python Version: 3.9.7
Python Path:
['/app/.heroku/python/bin',
'/app',
'/app/.heroku/python/lib/python39.zip',
'/app/.heroku/python/lib/python3.9',
'/app/.heroku/python/lib/python3.9/lib-dynload',
'/app/.heroku/python/lib/python3.9/site-packages']
Server time: Fri, 1 Jul 2022 02:32:13 +0000
但是,在python下验证时,可以正常弹出 tk 弹窗:
import tkinter
tkinter._test()
import tkinter
tkinter前没有下划线_