簡體   English   中英

ImportError:無法找到此安裝的PyGUI實現

[英]ImportError: Unable to find an implementation of PyGUI for this installation

我有一個使用PyGui軟件包運行的簡單應用程序。 在我決定一切正常之后,我重構了代碼並基本上將其分解為多個文件,但是我相當確定自己沒有更改任何文件的位置。 現在,當我嘗試運行我的應用程序時,它給了我以下錯誤:

Traceback (most recent call last):
File "blobedit.py", line 16, in <module>
    from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
  File "/Users/<myusername>/Desktop/BlobEdit/GUI/__init__.py", line 54, in <module>
    raise ImportError("Unable to find an implementation of PyGUI for this installation")
ImportError: Unable to find an implementation of PyGUI for this installation

我已經嘗試移動文件數周了,但是找不到問題。 任何幫助將非常感激!

您有一個目錄GUI並且在其中__init__.py ,這使該目錄成為可導入的程序包。

不幸的是,PyGUI 提供了一個GUI包。 由於Python搜索要導入的軟件包的方式,因此首先出現了GUI ,這就是引起問題的原因。

解決此問題的簡單方法是將GUI目錄/Users/Destkop/BlobEdit/GUI重命名為其他名稱。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM