ModuleNotFoundError:python 3.8.0 mac OS 10.15.3上没有名为“\u tkinter”的模块
回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>在Mac OS 10.15.3(Catalina)和pyenv上使用Python 3.8.0</p>
<p>当我尝试运行文件时,它会返回:</p>
<pre><code>ModuleNotFoundError: No module named '_tkinter'
</code></pre>
<p>我试过了。我有点担心,因为我在pyenv之上运行python,任何第三方tkinter模块都无法正常运行</p>
<p>运行<code>brew doctor</code>返回:</p>
<pre><code>Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
`/Users/jm/.pyenv/shims/python3.7-config
/Users/jm/.pyenv/shims/python3.7m-config
/Users/jm/.pyenv/shims/python-config
/Users/jm/.pyenv/shims/python3-config
/Users/jm/.pyenv/shims/python3.8-config`
</code></pre>