Pyinstaller Syntax error: 'yield' inside async function (Python 3.5.1)

前端 未结 1 1169
借酒劲吻你
借酒劲吻你 2021-01-17 16:08

I am trying to use pyinstaller to create a single executable to distribute to users without Python installed.

The script is a very simple one and just t

相关标签:
1条回答
  • 2021-01-17 16:46

    I got the same error.

    The reason is Jinja2 added new async function for Python3.6 in version 2.9.

    Please see http://jinja.pocoo.org/docs/2.9/changelog/#version-2-9-6

    There are two ways to avoid this error. Both of these worked for me.

    1. Downgrade jinja2

         # using Anaconda
         conda install jinja2=2.8.1
      
         # using pip
         pip install jinja2==2.8.1
      
    2. Install dev version of PyInstaller

        # install from github
        # Don't run "pip install -U pyinstaller" because the dev version is not released yet
        pip install git+https://github.com/pyinstaller/pyinstaller.git
      
        # check if "PyInstaller (3.3.dev0+g483dfde)" is in the list
        pip list
      
    0 讨论(0)
提交回复
热议问题