2016-01-20 33 views
2

我使用PyInstaller從我的python 3項目中創建一個.exe文件。爲什麼PyInstaller不檢測請求模塊?

問題是.exe文件這個錯誤

Traceback (most recent call last): 
    File "src\parser\bla.py", line 25, in get_b 
    File "src\parser\blabla.py", line 32, in __init__ 
    File "src\parser\blablabla.py", line 9, in get_b_a 
AttributeError: module 'requests' has no attribute 'get' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<string>", line 147, in <module> 
    File "<string>", line 141, in main 
    File "<string>", line 57, in saving_a 
    File "src\parser\bla.py", line 26, in get_a 
AttributeError: module 'requests' has no attribute 'exceptions' 
main returned -1 

我的規格看起來像這樣

block_cipher = None 

a = Analysis(['main.py'], 
      pathex=['F:\\Dropbox\\web development\\prjct', 'C:\\Users\\uzr\\AppData\\Local\\Programs\\Python\\Python35-32\\Lib\\site-packages'], 
      binaries=None, 
      datas=[ ('F:\\Dropbox\\web development\\prjct\\public\\thingies.txt', 'DATA') ], 
      hiddenimports=["requests"], 
      hookspath=[], 
      runtime_hooks=[], 
      excludes=[], 
      win_no_prefer_redirects=False, 
      win_private_assemblies=False, 
      cipher=block_cipher) 
pyz = PYZ(a.pure, a.zipped_data, 
      cipher=block_cipher) 
exe = EXE(pyz, 
      a.scripts, 
      a.binaries, 
      a.zipfiles, 
      a.datas, 
      name='main', 
      debug=False, 
      strip=False, 
      upx=True, 
      console=True) 

爲什麼犯規PyInstaller正確檢測請求模塊? 請求packege是2.9.1 PyInstaller 3.1

回答