pyinstaller报错SyntaxError: 'yield' inside async function 以及pyinstaller安装不了问题
最好的办法,从新装一遍高版本python环境,解决所有问题
> python -V Python 3.9.0 > pip -V pip 20.2.3 from d:\python\python310\lib\site-packages\pip (python 3.9) > pyinstaller -v 4.7
pyinstaller 安装如果直接安装报错,可以安装一个低版本试试
PS D:\python\Anaconda3\Scripts> pip install pyinstaller==3.2.1 Collecting pyinstaller==3.2.1 Downloading https://files.pythonhosted.org/packages/3f/d2/3515242cc5cfed12706506d17728a7ee0b8cf33840e250357fd793a94607/PyInstaller-3.2.1.tar.bz2 (2.4MB) |████████████████████████████████| 2.4MB 31kB/s Requirement already satisfied: setuptools in d:\python\anaconda3\lib\site-packages (from pyinstaller==3.2.1) (50.3.2) Collecting future (from pyinstaller==3.2.1) Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB) |████████████████████████████████| 829kB 22kB/s Building wheels for collected packages: pyinstaller, future Building wheel for pyinstaller (setup.py) ... done Stored in directory: C:\Users\lenovo\AppData\Local\pip\Cache\wheels\de\6f\41\ba18c0eaf3b6862d78c6bd50ca2679395c136fb9e087d21cf9 Building wheel for future (setup.py) ... done Stored in directory: C:\Users\lenovo\AppData\Local\pip\Cache\wheels\8b\99\a0\81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e Successfully built pyinstaller future Installing collected packages: future, pyinstaller Successfully installed future-0.18.2 pyinstaller-3.2.1 PS D:\python\Anaconda3\Scripts> pyinstaller usage: pyinstaller [-h] [-v] [-D] [-F] [--specpath DIR] [-n NAME] [--add-data <SRC;DEST or SRC:DEST>] [--add-binary <SRC;DEST or SRC:DEST>] [-p DIR] [--hidden-import MODULENAME] [--additional-hooks-dir HOOKSPATH] [--runtime-hook RUNTIME_HOOKS] [--exclude-module EXCLUDES] [--key KEY] [-d] [-s] [--noupx] [-c] [-w] [-i <FILE.ico or FILE.exe,ID or FILE.icns>] [--version-file FILE] [-m <FILE or XML>] [-r RESOURCE] [--uac-admin] [--uac-uiaccess] [--win-private-assemblies] [--win-no-prefer-redirects] [--osx-bundle-identifier BUNDLE_IDENTIFIER] [--distpath DIR] [--workpath WORKPATH] [-y] [--upx-dir UPX_DIR] [-a] [--clean] [--log-level LEVEL] [--upx UPX] scriptname [scriptname ...] pyinstaller: error: the following arguments are required: scriptname
SyntaxError: 'yield' inside async function
pip install git+https://github.com/pyinstaller/pyinstaller.git
PS D:\haojingkeji\flask-vue-crud\server> pip install git+https://github.com/pyinstaller/pyinstaller.git Collecting git+https://github.com/pyinstaller/pyinstaller.git Cloning https://github.com/pyinstaller/pyinstaller.git to c:\users\lenovo\appdata\local\temp\pip-req-build-ql6y77de Running command git clone -q https://github.com/pyinstaller/pyinstaller.git 'C:\Users\lenovo\AppData\Local\Temp\pip-req-build-ql6y77de'
加油,愿被这世界温柔以待 ^_^
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构