所以我试着安装了customtkinter,并且安装成功了。
Using cached customtkinter-4.6.3-py3-none-any.whl (246 kB)
Requirement already satisfied: darkdetect in c:\users\omen1\appdata\local\programs\python\python311\lib\site-packages (from customtkinter) (0.7.1)
Installing collected packages: customtkinter
Successfully installed customtkinter-4.6.3但是,当我转到vs代码并编写导入定制器并运行它时,
Traceback (most recent call last):
File "c:\Users\OMEN1\OneDrive\Skrivbord\python projects\database.py", line 290, in <module>
import customtkinter
ModuleNotFoundError: No module named 'customtkinter'我尝试卸载和重新安装我的pip也是完全更新的,以及我的python 3.11
我尝试过多种方法
发布于 2022-11-21 17:59:40
确保在VSCode中使用的解释器与安装库的位置对齐。
例如,如果您在Python3中安装了它,您的VSCode可能会被指向Python2。
此外,根据该库的PyPi 链接 -“要使用CustomTkinter,只需将存储库中的/customtkinter文件夹放在程序旁边,然后就可以进行自定义导入。”
https://stackoverflow.com/questions/74522343
复制相似问题