python - `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 模块。从命令提示符运行命令。
解决方案
不需要双引号。并放置 >> 而不是 > 。
推荐阅读
- machine-learning - 为什么随机森林总是给出 1.0 的预测分数?
- java - Selenium 和 Java 中的预期条件“OR”
- r - 通过 ggplotly 或 plotly 进行用户交互式绘图,删除 plotly 或 ggplotly 生成的散点图上的数据点
- node.js - 在 Mac OSX 上使用 node.js 复制带有 .plugin 包的目录的问题
- c++ - 有什么方法可以将集合/数组设置为方法参数吗?
- python - 在 Pandas 数据框中查找 asc/desc 序列
- javascript - 输入输入值时如何正确使用 toFixed
- validation - Yii2自定义验证规则,比较函数使用三个属性
- arrays - 如何在visual basic中合并三个数组?
- magento2 - 从 magento2 管理图像中刷新目录图像缓存后未在前端显示