Pyinstaller syntax error: "exit" inside an asynchronous function (Python 3.5.1)

I am trying to use pyinstallerto create a single executable file for distribution to users without installing Python.

The script is very simple and easy to test water. I use only a few lines of code like "Guinea Pig".

Program Hello World- no import, perfectly converted.

The My Guinea Pig program, which imports matplotlib.pyplotand displays a list of values, fails.

The problem is known and documented here , although they claim that it is fixed, or maybe I can not read it correctly. I think the fix should be available in the "dev version", which should be 3.2.1, and I installed via pip install --upgrade pyinstaller, to no avail.

I keep getting the same syntax error that occurs while reading

module jinja2\asyncsupport.py

Any idea how to get around this? My project is very simple and includes matplotlib, pandasreading a file and the construction of some of the data.

+4
source share
1 answer

I have the same error.

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

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

. .

  • jinja2

       # using Anaconda
       conda install jinja2=2.8.1
    
       # using pip
       pip install jinja2==2.8.1
    
  • dev 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
    
+11

Source: https://habr.com/ru/post/1673792/


All Articles