简体   繁体   中英

Why cant I use my newly downloaded python library?

So ive tried to install customtkinter and the installation was successfull

  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

But when i then go to vs code and write import customtkinter and run it says

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'

I have tried to uninstall and re-install My pip is also fully uppdated aswell as my python 3.11

Ive tried multiple things

Ensure that the interpreter you're using in VSCode is aligned to where you installed the library.

For example if you installed it with Python3, your VSCode may be pointed to Python2 instead.

Additionally, according to the PyPi link for that library - "To use CustomTkinter, just place the /customtkinter folder from this repository next to your program, and then you can do import customtkinter."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM