Pip Type Error on Git Push to Heroku App

May 20, 2015

When I was trying to create my requirements.txt file for my application in PowerShell, I first ran “pip freeze > requirements.txt”. However, when I tried to commit to Heroku, I received this error:

Pip Error

This happens because PowerShell outputs UTF-16 by default. Another way to fix it is by using the out-file command with an ascii encoding specified:

pip freeze | out-file -enc ascii requirements.txt

This makes it work with PowerShell, or the alternative is to just use the plain old command prompt.

Tags: Git,Heroku,PowerShell

Back to Posts