Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFound error.
#1
I created a new environment (env2) and used pip to install KivyCalendar-indicates installed successfully,see below. The application and its associated data base is located in this same environment folder. There has only been python 3.8 installed on this machine.

Where should i start looking to understand why it can not find it?

(env2) mark@mark-Latitude-E7240:~/env2$ pip install KivyCalendar
Processing /home/mark/.cache/pip/wheels/12/fe/f3/4c752c69dcefda3d061a8318880e1a36c11f7e2170673eed4e/KivyCalendar-0.1.3-py3-none-any.whl
Collecting kivy
  Using cached Kivy-2.0.0-cp38-cp38-manylinux2010_x86_64.whl (22.2 MB)
Collecting docutils
  Downloading docutils-0.18.1-py2.py3-none-any.whl (570 kB)
     |████████████████████████████████| 570 kB 514 kB/s 
Processing /home/mark/.cache/pip/wheels/d2/72/1a/9ddd17f00755707937caa350616965fb3330a6270425f397e6/Kivy_Garden-0.1.4-py3-none-any.whl
Collecting pygments
  Downloading Pygments-2.11.2-py3-none-any.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 1.4 MB/s 
Collecting requests
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     |████████████████████████████████| 63 kB 686 kB/s 
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
     |████████████████████████████████| 138 kB 2.1 MB/s 
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting idna<4,>=2.5; python_version >= "3"
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0; python_version >= "3"
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Installing collected packages: docutils, urllib3, certifi, idna, charset-normalizer, requests, Kivy-Garden, pygments, kivy, KivyCalendar
Successfully installed Kivy-Garden-0.1.4 KivyCalendar-0.1.3 certifi-2021.10.8 charset-normalizer-2.0.12 docutils-0.18.1 idna-3.3 kivy-2.0.0 pygments-2.11.2 requests-2.27.1 urllib3-1.26.8
(env2) mark@mark-Latitude-E7240:~/env2$ 


Exception has occurred: ModuleNotFoundError
No module named 'calendar_ui'
  File "/home/mark/env2/Bovine25.py", line 39, in <module>
    from KivyCalendar import CalendarWidget
Reply
#2
KivyCalendar is old and probably only supports python2.7 out of the box. See if KivyCalendar3 does any better for you.
Reply
#3
Thanks, is kivyMD a better source for widgets like these? All the kivyMBD info looks slick on mobile devices. is it the same on desktops?
Reply
#4
Same error after loading KivyCalendar3 even though the file does exist!
Let me share more information that may be relevant in hopes for some direction on a solution.

*I created an environment called env2 and activated it in the home terminal window (as opposed to the VS Debug terminal window- I really do not understand the differences here yet).
* I moved a copy of my application to the env2 folder.
* I used pip to install both kivycalendar3 and kivymd from the home terminal window. NOTE: both these folders DO now show up in env2/lib/python3.8 /site-packages/
*I use Visual Studio debugger
- I opened the application i had pasted into the env2 environment folder
- I noticed that the VS terminal did not show me active in the env2 folder like the home terminal screen did so i ran the 'source bin/activate' to get there.
  (env2) mark@mark-Latitude-E7240:~/env2$    
?? DID I PASTE MY PROGRAM INTO THE WRONG LOCATION maybe??


Exception has occurred: ModuleNotFoundError
No module named 'KivyCalendar3'
  File "/home/mark/env2/Bovine25.py", line 40, in <module>
    from KivyCalendar3 import DatePicker

#---------
mark@mark-Latitude-E7240:~/env2$  /usr/bin/env /bin/python3 /home/mark/.vscode/extensions/ms-python.python-2022.2.1924087327/pythonFiles/lib/python/debugpy/launcher 36711 -- /home/mark/env2/Bovine25.py 
[INFO   ] [Logger      ] Record log in /home/mark/.kivy/logs/kivy_22-03-06_0.txt
[INFO   ] [Kivy        ] v2.0.0
[INFO   ] [Kivy        ] Installed at "/home/mark/.local/lib/python3.8/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.8.10 (default, Nov 26 2021, 20:14:08) 
[GCC 9.3.0]
[INFO   ] [Python      ] Interpreter at "/bin/python3"
[INFO   ] [Factory     ] 186 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'3.0 Mesa 21.2.6'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel Open Source Technology Center'>
[INFO   ] [GL          ] OpenGL renderer <b'Mesa DRI Intel(R) HD Graphics 4400 (HSW GT2)'>
[INFO   ] [GL          ] OpenGL parsed version: 3, 0
[INFO   ] [GL          ] Shading version <b'1.30'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
Reply
#5
I do not help that you have installed KivyCalendar3(not use) or KivyMD(what you should),
into the the virtual environment,most also specify what you use in a buildozer.spec file.
Also in this file most Kivy version used and all 3-party modules be.
Look at tutorial eg Convert Python to Android.
Reply
#6
Could it be Visual Studio Debug console does not recognize kivyMD? I never could get past the import statement for anything kivyMD in VS without the error. By chance i ran from the terminal and did not get any " no module kivyMD" error.
Anyway thank you- you got me thinking.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ModuleNotFound but pip shows module installed biscotty666 2 1,547 Jul-14-2022, 05:17 PM
Last Post: Axel_Erfurt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020