为什么即使已经满足了要求,我也会得到一份工作?

2024-05-15 21:12:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在为我的UBUNTU 20.4.3制作一个JARVIS AI。我已经安装了pyttsx3,但仍然出现了一个错误。请在这方面提供帮助:

macos@UBUNTU20:~/Python$ python -u "/home/macos/Python/jarvis.py"
Traceback (most recent call last):
  File "/home/macos/Python/jarvis.py", line 1, in <module>
    import pyttsx3
ImportError: No module named pyttsx3
macos@UBUNTU20:~/Python$ pip install pyttsx3
Requirement already satisfied: pyttsx3 in /home/macos/.local/lib/python3.8/site-packages (2.90)

Tags: inpymosthomeubuntu错误macosai
1条回答
网友
1楼 · 发布于 2024-05-15 21:12:51

在许多Mac/Linux计算机(本例中为Ubuntu)上安装了Python2发行版。如果python version打印出如下内容

Python 2.7.9

您可以通过运行python3而不是python来解决混淆:

python3 -u "/home/macos/Python/jarvis.py"

相关问题 更多 >