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?
Asked
Active
Viewed 2,893 times
4

desertnaut
- 57,590
- 26
- 140
- 166

user12891240
- 47
- 2
- 5
-
Your `pip3` installed the package for a different Python, not that one you use to run the script. `python --version`, `pip --version`, `which python`, `which pip`, etc. – phd Feb 18 '20 at 17:36
-
how do i move the package to my actual version of python – user12891240 Feb 18 '20 at 17:54
-
You shouldn't because packages, especially written in C, are fragile and cannot be moved. Install with a proper version of `pip` or `python -m pip`. – phd Feb 18 '20 at 17:56
-
Install it from the `IDE` you are using – AD WAN Feb 18 '20 at 18:15
-
(1) Find the directory where `tkcalendar` was installed in. (2) Make sure that that directory is in your PATH environment variable. if it isn't there, you need to update your PATH. Issue the command `echo $PATH` in your terminal to see your PATH value. – Sun Bear Feb 18 '20 at 19:31
2 Answers
1
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

Tom
- 196
- 1
- 10
0
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.