我是PyInstaller的新手 . 我有一个关于Python的程序,并希望将其转换为Ubuntu下的独立可执行文件 . 我尝试:

pyinstaller -y --clean --hidden-import=Crypto.Util._counter pycrypter.py

但是当我执行结果文件时:

cd dist/pycrypter
./pycrypter

我有以下错误:

Traceback (most recent call last):
  File "", line 3, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/models", line 1, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/models.PyCrypter", line 3, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.PublicKey.RSA", line 78, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.Random", line 29, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.Random._UserFriendlyRNG", line 38, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.Random.Fortuna.FortunaAccumulator", line 39, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.Random.Fortuna.FortunaGenerator", line 35, in 
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/fomalhaut/Development/python/pycrypter/build/pycrypter/out00-PYZ.pyz/Crypto.Util.Counter", line 59, in 
ImportError: cannot import name _counter

如何通过PyInstaller正确转换我的程序?