<tfoot id='pQz03'></tfoot>
        <i id='pQz03'><tr id='pQz03'><dt id='pQz03'><q id='pQz03'><span id='pQz03'><b id='pQz03'><form id='pQz03'><ins id='pQz03'></ins><ul id='pQz03'></ul><sub id='pQz03'></sub></form><legend id='pQz03'></legend><bdo id='pQz03'><pre id='pQz03'><center id='pQz03'></center></pre></bdo></b><th id='pQz03'></th></span></q></dt></tr></i><div id='pQz03'><tfoot id='pQz03'></tfoot><dl id='pQz03'><fieldset id='pQz03'></fieldset></dl></div>
      1. <legend id='pQz03'><style id='pQz03'><dir id='pQz03'><q id='pQz03'></q></dir></style></legend>

        <small id='pQz03'></small><noframes id='pQz03'>

        • <bdo id='pQz03'></bdo><ul id='pQz03'></ul>
      2. 出现错误:没有名为“calendar_ui"的模块.即使 KivyCalendar 已在 Windows 10

        Getting error : No module named #39;calendar_ui#39;. even though KivyCalendar has been installed using pip in windows 10(出现错误:没有名为“calendar_ui的模块.即使 KivyCalendar 已在 Windows 10 中使用 pip 安装) - IT屋-程序员软件开发技术分享社
      3. <i id='Pl01r'><tr id='Pl01r'><dt id='Pl01r'><q id='Pl01r'><span id='Pl01r'><b id='Pl01r'><form id='Pl01r'><ins id='Pl01r'></ins><ul id='Pl01r'></ul><sub id='Pl01r'></sub></form><legend id='Pl01r'></legend><bdo id='Pl01r'><pre id='Pl01r'><center id='Pl01r'></center></pre></bdo></b><th id='Pl01r'></th></span></q></dt></tr></i><div id='Pl01r'><tfoot id='Pl01r'></tfoot><dl id='Pl01r'><fieldset id='Pl01r'></fieldset></dl></div>
          <bdo id='Pl01r'></bdo><ul id='Pl01r'></ul>

              <tfoot id='Pl01r'></tfoot>
                  <tbody id='Pl01r'></tbody>

                  <small id='Pl01r'></small><noframes id='Pl01r'>

                1. <legend id='Pl01r'><style id='Pl01r'><dir id='Pl01r'><q id='Pl01r'></q></dir></style></legend>
                2. 本文介绍了出现错误:没有名为“calendar_ui"的模块.即使 KivyCalendar 已在 Windows 10 中使用 pip 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  KivyCalendar 已在 windows 10 中使用 pip 安装.但返回错误:-

                  KivyCalendar has been installed using pip in windows 10. But returns an error:-

                  没有名为calendar_ui"的模块

                  No module named 'calendar_ui

                  我的代码是:

                  from kivy.app import App
                  from KivyCalendar import CalendarWidget
                  
                  
                  class MyApp(App):
                  
                      def build(self):
                          return CalendarWidget()
                  
                  MyApp().run()
                  

                  任何帮助将不胜感激.谢谢

                  Any help would be much appreciated. Thanks

                  推荐答案

                  我在项目中使用 KivyCalendar 时遇到了一些问题,因此我做了一些改进以使其在 Python 3 上运行.确保有原始文件的副本.

                  I had a few troubles using KivyCalendar in my project so I made a few improvements to make it work on Python 3. Make sure to have a copy of original files.

                  添加行首带有 + 标记的行并删除行首带有 - 标记的文件.

                  Add lines which are having a + mark at the beginning of the line and remove files which are having a - mark at the beginning of the line.

                  首先找到kivycalendar的安装目录.

                  First of all find the directory where kivycalendar is installed.

                  KivyCalendar/init.py

                  KivyCalendar/init.py

                   #!/usr/bin/python
                   # -*- coding: utf-8 -*-
                  
                   -from calendar_ui import DatePicker, CalendarWidget
                   +from .calendar_ui import DatePicker, CalendarWidget
                  

                  KivyCalendar/calendar_data.py

                  KivyCalendar/calendar_data.py

                  -from calendar import TimeEncoding, month_name, day_abbr, Calendar, monthrange
                  +from calendar import month_name, day_abbr, Calendar, monthrange
                   from datetime import datetime
                   from locale import getdefaultlocale
                  +import locale as _locale
                  +
                  +
                  +class TimeEncoding:
                  +    def __init__(self, locale):
                  +        self.locale = locale
                  +
                  +    def __enter__(self):
                  +        self.oldlocale = _locale.setlocale(_locale.LC_TIME, self.locale)
                  +        return _locale.getlocale(_locale.LC_TIME)[1]
                  +
                  +    def __exit__(self, *args):
                  +        _locale.setlocale(_locale.LC_TIME, self.oldlocale)
                  +
                  
                   def get_month_names():
                       """ Return list with months names """
                  

                  KivyCalendar/calendar_ui.py

                  KivyCalendar/calendar_ui.py

                   from kivy.core.window import Window
                   from kivy.properties import NumericProperty, ReferenceListProperty
                  
                  -import calendar_data as cal_data
                  +from . import calendar_data as cal_data
                   ###########################################################
                   Builder.load_string("""
                   <ArrowButton>:
                  

                  这篇关于出现错误:没有名为“calendar_ui"的模块.即使 KivyCalendar 已在 Windows 10 中使用 pip 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                    <bdo id='Ks8Ex'></bdo><ul id='Ks8Ex'></ul>

                        <tbody id='Ks8Ex'></tbody>

                      <small id='Ks8Ex'></small><noframes id='Ks8Ex'>

                      <tfoot id='Ks8Ex'></tfoot>

                        • <i id='Ks8Ex'><tr id='Ks8Ex'><dt id='Ks8Ex'><q id='Ks8Ex'><span id='Ks8Ex'><b id='Ks8Ex'><form id='Ks8Ex'><ins id='Ks8Ex'></ins><ul id='Ks8Ex'></ul><sub id='Ks8Ex'></sub></form><legend id='Ks8Ex'></legend><bdo id='Ks8Ex'><pre id='Ks8Ex'><center id='Ks8Ex'></center></pre></bdo></b><th id='Ks8Ex'></th></span></q></dt></tr></i><div id='Ks8Ex'><tfoot id='Ks8Ex'></tfoot><dl id='Ks8Ex'><fieldset id='Ks8Ex'></fieldset></dl></div>

                          • <legend id='Ks8Ex'><style id='Ks8Ex'><dir id='Ks8Ex'><q id='Ks8Ex'></q></dir></style></legend>