试图在python命令中查看已安装模块的列表会显示一个空白的kivy应用程序窗口

时间:2018-04-27 12:33:05

标签: python kivy

我一直在努力教自己python来帮助我的工作程序。在完成一些基础语言课程后,我想开始学习 Kivy 模块来创建一个Windows应用程序。经过几十次尝试失败后,我设法安装了Kivy,它似乎正在运行。但是,每次我使用:

help('modules')

我得到以下错误列表。我现在选择忽略,但弹出一个空白的kivy应用程序屏幕。

>>> help('modules')

Please wait a moment while I gather a list of all available modules...
 C:\Program Files
 (x86)\Python36-32\lib\site-packages\IPython\kernel\__init__.py:13:
 ShimWarning: The `IPython.kernel` package has been deprecated since
 IPython 4.0.You should import from ipykernel or jupyter_client
 instead.   "You should import from ipykernel or jupyter_client
 instead.", ShimWarning) [INFO   ] [Logger      ] Record log in
 C:\Users\sambi\.kivy\logs\kivy_18-04-27_2.txt 1172 INFO: [Logger     
 ] Record log in C:\Users\sambi\.kivy\logs\kivy_18-04-27_2.txt [INFO  
 ] [Kivy        ] v1.10.0 1171 INFO: [Kivy        ] v1.10.0 [INFO   ]
 [Python      ] v3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC
 v.1900 32 bit (Intel)] 1173 INFO: [Python      ] v3.6.5
 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]
 [INFO   ] [Audio       ] Providers: audio_sdl2 (audio_ffpyplayer
 ignored) 1193 INFO: [Audio       ] Providers: audio_sdl2
 (audio_ffpyplayer ignored) [INFO   ] [Image       ] Providers:
 img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
 1212 INFO: [Image       ] Providers: img_tex, img_dds, img_sdl2,
 img_pil, img_gif (img_ffpyplayer ignored) [CRITICAL] [Camera      ]
 Unable to find any valuable Camera provider. opencv -
 ModuleNotFoundError: No module named 'cv2'   File "C:\Program Files
 (x86)\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59,
 in core_select_lib
     fromlist=[modulename], level=0)   File "C:\Program Files (x86)\Python36-32\lib\site-packages\kivy\core\camera\camera_opencv.py",
 line 45, in <module>
     import cv2

 1230 CRITICAL: [Camera      ] Unable to find any valuable Camera
 provider. opencv - ModuleNotFoundError: No module named 'cv2'   File
 "C:\Program Files
 (x86)\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59,
 in core_select_lib
     fromlist=[modulename], level=0)   File "C:\Program Files (x86)\Python36-32\lib\site-packages\kivy\core\camera\camera_opencv.py",
 line 45, in <module>
     import cv2

 [INFO   ] [Clipboard   ] Provider: winctypes 1234 INFO: [Clipboard   ]
 Provider: winctypes [INFO   ] [Factory     ] 194 symbols loaded 1239
 INFO: [Factory     ] 194 symbols loaded [INFO   ] [OSC         ] using
 <thread> for socket 1330 INFO: [OSC         ] using <thread> for
 socket [INFO   ] [Window      ] Provider: sdl2 1338 INFO: [Window     
 ] Provider: sdl2 [INFO   ] [GL          ] Using the "OpenGL" graphics
 system 1711 INFO: [GL          ] Using the "OpenGL" graphics system
 [INFO   ] [GL          ] GLEW initialization succeeded 1714 INFO: [GL 
 ] GLEW initialization succeeded [INFO   ] [GL          ] Backend used
 <glew> 1714 INFO: [GL          ] Backend used <glew> [INFO   ] [GL    
 ] OpenGL version <b'4.5.13506 Compatibility Profile Context
 23.20.15002.11'> 1715 INFO: [GL          ] OpenGL version <b'4.5.13506 Compatibility Profile Context 23.20.15002.11'> [INFO   ] [GL         
 ] OpenGL vendor <b'ATI Technologies Inc.'> 1715 INFO: [GL          ]
 OpenGL vendor <b'ATI Technologies Inc.'> [INFO   ] [GL          ]
 OpenGL renderer <b'AMD Radeon (TM) R9 200 Series'> 1716 INFO: [GL     
 ] OpenGL renderer <b'AMD Radeon (TM) R9 200 Series'> [INFO   ] [GL    
 ] OpenGL parsed version: 4, 5 1716 INFO: [GL          ] OpenGL parsed
 version: 4, 5 [INFO   ] [GL          ] Shading version <b'4.50'> 1716
 INFO: [GL          ] Shading version <b'4.50'> [INFO   ] [GL         
 ] Texture max size <16384> 1717 INFO: [GL          ] Texture max size
 <16384> [INFO   ] [GL          ] Texture max units <32> 1717 INFO: [GL
 ] Texture max units <32> [INFO   ] [Window      ] auto add sdl2 input
 provider 1733 INFO: [Window      ] auto add sdl2 input provider [INFO 
 ] [Window      ] virtual keyboard not allowed, single mode, not docked
 1735 INFO: [Window      ] virtual keyboard not allowed, single mode,
 not docked [CRITICAL] [Spelling    ] Unable to find any valuable
 Spelling provider. enchant - ModuleNotFoundError: No module named
 'enchant'   File "C:\Program Files
 (x86)\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59,
 in core_select_lib
     fromlist=[modulename], level=0)   File "C:\Program Files (x86)\Python36-32\lib\site-packages\kivy\core\spelling\spelling_enchant.py",
 line 6, in <module>
     import enchant

 1739 CRITICAL: [Spelling    ] Unable to find any valuable Spelling
 provider. enchant - ModuleNotFoundError: No module named 'enchant'  
 File "C:\Program Files
 (x86)\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59,
 in core_select_lib
     fromlist=[modulename], level=0)   File "C:\Program Files (x86)\Python36-32\lib\site-packages\kivy\core\spelling\spelling_enchant.py",
 line 6, in <module>
     import enchant

 [INFO   ] [Text        ] Provider: pil(['text_sdl2'] ignored) 1757
 INFO: [Text        ] Provider: pil(['text_sdl2'] ignored) [INFO   ]
 [Video       ] Provider: null(['video_ffmpeg', 'video_ffpyplayer']
 ignored) 1765 INFO: [Video       ] Provider: null(['video_ffmpeg',
 'video_ffpyplayer'] ignored) [INFO   ] [Logger      ] Record log in
 C:\Users\sambi\.kivy\logs\kivy_18-04-27_3.txt [INFO   ] [Kivy        ]
 v1.10.0 [INFO   ] [Python      ] v3.6.5 (v3.6.5:f59c0932b4, Mar 28
 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] [INFO   ] [Image       ]
 Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif
 (img_ffpyplayer ignored) Cython              certifi            
 multiprocessing     sympyprinting IPython             cgi             
 netbios             symtable PIL                 cgitb              
 netrc               sys PyInstaller         chardet            
 nntplib             sysconfig
 __future__          chunk               nt                  tabnanny
 _ast                cmath               ntpath              tarfile
 _asyncio            cmd                 ntsecuritycon       telnetlib
 _bisect             code                nturl2path          tempfile
 _blake2             codecs              numbers             test
 _bootlocale         codeop              odbc                tests
 _bz2                collections         opcode              textwrap
 _codecs             colorama            openpyxl            this
 _codecs_cn          colorsys            operator            threading
 _codecs_hk          commctrl            optparse            time
 _codecs_iso2022     compileall          ordlookup           timeit
 _codecs_jp          concurrent          os                  timer
 _codecs_kr          configparser        parser              tkinter
 _codecs_tw          contextlib          parso               token
 _collections        copy                past                tokenize
 _collections_abc    copyreg             pathlib             trace
 _compat_pickle      crypt               pdb                 traceback
 _compression        csv                 pefile              tracemalloc
 _csv                ctypes              perfmon             traitlets
 _ctypes             curses              peutils             tty
 _ctypes_test        cython              pickle              turtle
 _datetime           cythonmagic         pickleshare         turtledemo
 _decimal            datetime            pickletools         twilio
 _distutils_findvs   dbi                 pip                 types
 _dummy_thread       dbm                 pipes               typing
 _elementtree        dde                 pkg_resources       unicodedata
 _functools          decimal             pkgutil             unittest
 _hashlib            decorator           platform            urllib
 _heapq              difflib             plistlib            urllib3
 _imp                dis                 poplib              uu
 _io                 distutils           posixpath           uuid
 _json               doctest             pprint              venv
 _locale             docutils            profile             warnings
 _lsprof             dummy_threading     prompt_toolkit      wave
 _lzma               easy_install        pstats              wcwidth
 _markupbase         email               pty                 weakref
 _md5                encodings           py_compile          webbrowser
 _msi                ensurepip           pyautogui           wget
 _multibytecodec     enum                pyclbr              wheel
 _multiprocessing    errno               pydoc               win2kras
 _opcode             et_xmlfile          pydoc_data          win32api
 _operator           faulthandler        pyexpat             win32clipboard
 _osx_support        filecmp             pygame              win32com
 _overlapped         fileinput           pygments            win32con
 _pickle             fnmatch             pymsgbox            win32console
 _pydecimal          formatter           pyscreeze           win32cred
 _pyio               fractions           pythoncom           win32crypt
 _random             ftplib              pytweening          win32cryptcon
 _sha1               functools           pytz                win32ctypes
 _sha256             future              pywin               win32event
 _sha3               garden              pywin32_testutil    win32evtlog
 _sha512             gc                  pywintypes          win32evtlogutil
 _signal             genericpath         pyximport           win32file
 _sitebuiltins       getopt              queue               win32gui
 _socket             getpass             quopri              win32gui_struct
 _sqlite3            gettext             random              win32help
 _sre                glob                rasutil             win32inet
 _ssl                gzip                re                  win32inetcon
 _stat               hashlib             regcheck            win32job
 _string             heapq               regutil             win32lz
 _strptime           hmac                reprlib             win32net
 _struct             html                requests            win32netcon
 _symtable           http                rlcompleter         win32pdh
 _testbuffer         idlelib             rmagic              win32pdhquery
 _testcapi           idna                runpy               win32pdhutil
 _testconsole        imaplib             sched               win32pipe
 _testimportmultiple imghdr              secrets             win32print
 _testmultiphase     imp                 select              win32process
 _thread             importlib           selectors           win32profile
 _threading_local    inspect             selenium            win32ras
 _tkinter            io                  servicemanager      win32rcparser
 _tracemalloc        ipaddress           setuptools          win32security
 _warnings           ipython_genutils    shelve              win32service
 _weakref            isapi               shlex               win32serviceutil
 _weakrefset         itertools           shutil              win32timezone
 _win32sysloader     jdcal               signal              win32trace
 _winapi             jedi                simplegeneric       win32traceutil
 _winxptheme         json                site                win32transaction abc                 jwt                 six          
 win32ts adodbapi            keyword             smtpd              
 win32ui afxres              kivy                smtplib            
 win32uiole aifc                lib2to3             sndhdr             
 win32verstamp altgraph            libfuturize         socket          
 win32wnet antigravity         libpasteurize       socketserver       
 winerror argparse            linecache           socks              
 winioctlcon array               locale              sockshandler      
 winnt ast                 logging             sqlite3            
 winperf asynchat            lzma                sre_compile        
 winreg asyncio             macholib            sre_constants      
 winsound asyncore            macpath             sre_parse          
 winxpgui atexit              macurl2path         ssl                
 winxptheme audioop             mailbox             sspi               
 wsgiref autoreload          mailcap             sspicon            
 xdrlib base64              marshal             stat                xml
 bdb                 math                statistics          xmlrpc
 binascii            mimetypes           storemagic          xxsubtype
 binhex              mmap                string              zipapp
 bisect              mmapfile            stringprep          zipfile
 builtins            mmsystem            struct              zipimport
 bz2                 modulefinder        subprocess          zlib
 cProfile            msilib              sunau calendar           
 msvcrt              symbol

 Enter any module name to get more help.  Or, type "modules spam" to
 search for modules whose name or summary contain the string "spam".

我做的另一件事是尝试安装pyinstaller并不太好。我正在使用 Windows 10 Python3.6.5

当我从exit()退出python时,应用程序窗口消失了。来自python的IDLE help('modules')中发生同样的事情会带来kivy app:

enter image description here

1 个答案:

答案 0 :(得分:0)

使用pip listpython -m pip list

示例:

c:\python3>pip -V
pip 18.1 from c:\python3\lib\site-packages\pip (python 3.7)

c:\python3>pip list
Package            Version
------------------ -------
asn1crypto         0.24.0
backcall           0.1.0
bcrypt             3.1.4
bleach             3.0.2
cffi               1.11.5
Click              7.0
colorama           0.4.0
cryptography       2.4.1
decorator          4.3.0
defusedxml         0.5.0
entrypoints        0.2.3
Flask              1.0.2
idna               2.7
ipykernel          5.1.0
ipython            7.1.1
ipython-genutils   0.2.0
ipywidgets         7.4.2
itsdangerous       1.1.0
jedi               0.13.1
Jinja2             2.10
jsonschema         2.6.0
jupyter            1.0.0
jupyter-client     5.2.3
jupyter-console    6.0.0
jupyter-core       4.4.0
MarkupSafe         1.1.0
mistune            0.8.4
nbconvert          5.4.0
nbformat           4.4.0
notebook           5.7.2
pandocfilters      1.4.2
paramiko           2.4.2
parso              0.3.1
pickleshare        0.7.5
pip                18.1
prometheus-client  0.4.2
prompt-toolkit     2.0.7
pyasn1             0.4.4
pycparser          2.19
Pygments           2.2.0
PyNaCl             1.3.0
python-dateutil    2.7.5
python-sshtail     0.0.2
pywinpty           0.5.4
pyzmq              17.1.2
qtconsole          4.4.3
Send2Trash         1.5.0
setuptools         39.0.1
six                1.11.0
tailer             0.4.1
terminado          0.8.1
testpath           0.4.2
tornado            5.1.1
traitlets          4.3.2
utils              0.9.0
wcwidth            0.1.7
webencodings       0.5.1
Werkzeug           0.14.1
widgetsnbextension 3.4.2

c:\python3>