【发布时间】:2021-09-26 17:21:15
【问题描述】:
出于某种奇怪的原因,无论我在转到import 时安装哪个包,它都不知道我在说什么包。我很确定这是一个 Visual Studio Code 错误,但如果不是,我也在使用 Linux。
当我 pip install 包裹 pyttsx3 这就是我在终端中得到的:
Collecting pyttsx3
Downloading https://files.pythonhosted.org/packages/24/4e/580726c73272344d3e74b7aaffae55ff6b6450061fbecb8cc6e112531c02/pyttsx3-2.7.tar.gz
Building wheels for collected packages: pyttsx3
Running setup.py bdist_wheel for pyttsx3 ... done
Stored in directory: /home/secretlloyd/.cache/pip/wheels/a2/8a/fe/11112aca9c89142c3a404bc67ef3393a7ad530da26639a05d4
Successfully built pyttsx3
Installing collected packages: pyttsx3
Successfully installed pyttsx3-2.7
但是当我运行一个示例时,我得到了这个错误:
Traceback (most recent call last):
File "/home/secretlloyd/Visual Studio Code/Python/Finished/Text Colors/finished.py", line 1, in <module>
import pyttsx3
ModuleNotFoundError: No module named 'pyttsx3'
【问题讨论】:
标签: python linux visual-studio-code import