ModuleNotFoundError: No module named 'tkcalendar' - python

I have installed tkcalendar using pip3 install tkcalendar and it says that it has installed successfully. However, when i run the line from tkcalendar import * in my program, it gives me ModuleNotFoundError: No module named 'tkcalendar'. Can anybody help?

Make sure that when you're running your file you use python3. I was having the same issue because I just used python and it reverted to python2

I had this same problem and since I was new to this I searched everywhere and couldn't find a solution that worked. Finally I moved the cursor to line 'from tkcalendar import *' (right over tkcalendar) and a pop-up gave me a link to install tkcalendar. That seemed to be all there was to it. I tried pip install tkcalendar several times and even pip3 to see what it would do. Nothing worked except for what I just mentioned above.

Related

I have installed keyboard, but it wont import

I did:
pip install keyboard
It shows up in my file directory, however when I try and import it I get the following message:
ModuleNotFoundError: No module named 'keyboard'
I am using Python 3.10, and keyboard 0.13.5.
Any suggestions would be greatly apreciated.

VsCode doesn't recognize modules (I'm using python 3.10)

As the title says, apparently VsCode doesn't recognize several modules that I already installed on my MacBook. For example,
from bs4 import BeautifulSoup
from requests import request
from tkinter import *
And the error message says,
No module named 'bs4'
File "/Users/my_name/Desktop/VsCode Projects/weather_detecter/main.py", line 7, in
<module>
from bs4 import BeautifulSoup
Also, it says the same thing on requests, but not on tkinter. I tried sudo pip, -m, pip3 on both terminal.app and VsCode terminal, but the outcome is still the same. How can I fix this?
You might need to select the correct python interpreter version first and then try importing the modules.
OR, open terminal in VS Code and try reinstalling the modules with the command python3 -m pip install <module_name>

" ModuleNotFoundError: No module named 'azure' " after importing azure.datalake.store even though it is installed

I have tried installing and re-installing the package multiple times (pip install azure-datalake-store) to solve this problem but nothing will work. I have have multiple other imports that all work, but "from azure.datalake.store import core, lib, multithread" keeps giving me a ModuleNotFoundError. Any advice to fix this would be much appreciated
Can you try this command explicitly to have successful import as mentioned here
!pip install azure-datalake-store

python pqdict isn't working (from pqdict import * ImportError: No module named 'pqdict')

I tried:
from pqdict import *
but it doesn't work. I receive the error:
from pqdict import * ImportError: No module named 'pqdict'
I tried to check if it requires download and install, but it seems it doesn't (and there is noothing for windowd 64 bit). What is the problem?
Go to Windows' command prompt. Then type in pip install pqdict and hit Enter. Then wait for it to install.
Once you done that, try that again. Probably will work since it is now installed.

No module named 'win32api'

In Python 3.4 from Anaconda, I created a program and it is giving me and import error each time I run it.
Using Spyder.
ImportError: No module named 'win32api'
I already have the pywin32 installed. And I can see the win32api.pyd under C:\Anaconda3\Lib\site-packages\win32
This is the import code on my program:
from tkinter import *
from tkinter import ttk
import tkinter.messagebox
import time
import requests #needs to be installed
import pymysql #needs to be installed
import csv
import win32com.client #needs to be installed
import datetime
This is the whole error:
File "C:\Anaconda3\lib\site-packages\win32com\__init__.py", line 5, in <module>
import win32api, sys, os
ImportError: No module named 'win32api'
This is the only instance of Python I have installed. I uninstalled everything else and installed only Anaconda.
Searching online I got to something that said that it could be a problem with the PYTHONPATH. But honestly, I have no idea what they are talking about.
So any noob help would be really appreciated.
I am using Windows 7 by the way.
Thank you
The installation for pywin32 must have failed, or it is not for same OS bit architecture (say anaconda 64 bit and pywin32 32 bit). I recommend
you uninstall pywin32,
check what bit version of anaconda you are using, then
install pywin32 for same version,
verify that the installer indicates 100% success and there are no errors flagged in the installer's log window (it's rare but something may fail and the installer doesn't know).
Then open a python console and type "import win32com".
If #5 fails to import win32com, then:
try installing a different version of python, for example from python.org
repeat steps 2 to 5 above but for new python instead of anaconda
Could be that anaconda distributors did something to the python interpreter (although I didn't think so), or that some libs aren't registered right (see answer https://stackoverflow.com/a/17061853/869951 for some more things to try).
This should work:
pip install pypiwin32
I had the same problem and solved it installing the module pywin32:
In a normal python:
pip install pywin32
In anaconda:
conda install pywin32
My python installation (IntelĀ® Distribution for Python) had some kind of dependency problem and was giving this error. After installing this module I never more saw it.
As mentioned by outforawhile in comment, simply restarting the laptop fixed this for me.
It may be that this is required for Windows to register the DLL.
try this before install pywin32
pip install pywinutils

Categories