首页 > 解决方案 > `pip freeze > requirements.txt`出错

问题描述

我正在阅读 Python Crash Course 书籍,并且正在将我的应用程序部署到 Heroku 部分。尝试创建 requirements.txt 文件时,我收到此错误:

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'>
OSError: [Errno 9] Bad file descriptor

我在 Windows 上并使用 venv 模块。从命令提示符运行命令。

标签: pythonpip

解决方案


不需要双引号。并放置 >> 而不是 > 。


推荐阅读