I put my colorize.py
package onto PyPi
and discovered the following strange behavior. If I download the colorize.py-0.9.1.tar.gz
from the project page, and I examine the first line of colorize.py
, I get the following output:
$ wget https://files.pythonhosted.org/packages/91/d8/805853c14a8ccf67ddfe2cf41b634395ef69a1138a0dade303bf4b7c9b45/colorize.py-0.9.1.tar.gz
$ tar xvfz colorize.py-0.9.1.tar.gz
$ head -n1 colorize.py-0.9.1/colorize.py
#!/usr/bin/env python
However, on the same my Ubuntu 16.04.4 LTS
laptop, if I install using pip
, the first line is has been replaced:
$ pip install colorize.py
$ head -n1 $(which colorize.py)
#!/usr/bin/python
On the other hand, my friend runs the same installation command on her OS X laptop, and gets the original interpreter line.
What is going on here, and is it possible to force pip
to not change the interpreter line when performing installation?