importerror

    0熱度

    1回答

    嗨,我是新來的python,並認爲我與我建立的程序結構有問題。 這是我想到的結構的摘錄。 . └── asd ├── asd.py ├── __init__.py ├── Framework │   ├── importer.py │   └── __init__.py ├── Library │   ├── libraryM

    -1熱度

    1回答

    嘗試從另一個.py文件導入一個類到我的Python代碼中我已經寫入幷包含在相同的子目錄中,但是我收到錯誤: ModuleNotFoundError: No module named 'main.S_DES_Functions'; 'main' is not a package 請在下面找到我的Python項目的佈局圖片。 我希望這只是一個非常愚蠢的錯誤,我正在做,因此,如果任何人都可以請告知我在做

    0熱度

    3回答

    我有一個名爲handshake.py的文件。哪裏有函數send_data(參數)。我想將該函數導入另一個名爲siptest.py的文件中。我遇到兩個問題。我正在使用Windows 7,64位的Microsoft Visual Studio。 1)我無法導入功能。我曾嘗試使用, from handshake import* handshkae.send_data(argument) 這給我一個

    2熱度

    1回答

    我試圖導入一個模塊(module_name.py),我已經創建using __import__() 但我看到下面的錯誤模塊: Traceback (most recent call last): File "test.py", line 80, in <module> testImportMethod() File "test.py", line 68, in tes

    0熱度

    1回答

    這一直在推動着我的發展。我有下面的樹結構的Django項目,並想從根目錄 load_professors_into_db.py具有下面的代碼運行python helper_scripts/load_professors_into_db.py: ## TODO: FIX THIS DAMN IMPORT PATH. THE SCRIPT DOESNT RUN CAUSE OF IT from oc

    1熱度

    2回答

    我試圖在pythinanywhere上使用Django在python上構建項目。 我對Django一點都不熟悉,所以任何暗示它都是值得歡迎的。 我創建了一個名爲profiles的Django應用程序,並且我創建了一些db模型。到現在爲止還挺好。 我正在使用sqlite3,我設法遷移數據庫並正確啓動我的項目。 我現在已經修改了文件models.py但在使用命令運行遷移: 「蟒蛇./manage.py

    0熱度

    1回答

    我使用python 2.7.13 shell,如下面的代碼中所示,我已經安裝了語音識別,但它沒有顯示出來。 >>> pip.main (['install','speechrecognition']) Requirement already satisfied: speechrecognition in c:\python27\lib\site-packages 0 >>> import

    -1熱度

    1回答

    在將此標記爲重複項之前,請閱讀整個問題,它不是通常的sys.path導入錯誤。 這是模塊的目錄結構,我試圖導入 root |_moduleDir1 | |_ myModule1.py | |_ __init__.py |_ moduleDir2 |_ myModule2.py |_ __init__.py 我用兩臺不同的機器工作。我的腳本在一個上運行良好,另一方面我

    1熱度

    5回答

    我正在使用Python 3. 我在同一個目錄中有兩個Python文件:first.py和second.py。 在first.py的開始,我用: from second import * 然而,返回以下錯誤信息: ModuleNotFoundError: No module named 'second' 我應該如何將其導入first.py? 更新:爲了闡明我的具體使用案例,我試圖在Djang

    0熱度

    1回答

    ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?) 我在2013-2014年構建了這個應用程序,從那以後它沒有看到太多的維護。但現在有一個問題,需要更改一些AWS密鑰,但我無法部署該應用。 git pu