pip install django-graphos fails with TypeError
Closed this issue · 4 comments
I'm working on a heroku/django build that I'm testing in a virtualenv, which I would like to use django-graphos for. I ran pip install
from the venv and had it fail on me. After posting the following error on StackOverflow, I got a comment pointing out that the print statement referenced below is not valid python 3 code. The error is as follows:
(venv) $ > pip install django-graphos
Collecting django-graphos
Using cached django-graphos-0.1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/qt/s4gp855d38s6rrj34fdlmwk40000gn/T/pip-build-q69jbvga/django-graphos/setup.py", line 132, in <module>
package_data=find_package_data("graphos", only_in_packages=False),
File "/private/var/folders/qt/s4gp855d38s6rrj34fdlmwk40000gn/T/pip-build-q69jbvga/django-graphos/setup.py", line 106, in find_package_data
print >> sys.stderr, (
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/qt/s4gp855d38s6rrj34fdlmwk40000gn/T/pip-build-10_yhb6j/django-graphos/
And subsequently it was pointed out that the error was fixed but not merged to master in September of 2015. After cloning to my own repo (https://github.com/iannesbitt/django-graphos), editing settings.py to include python-3-friendly print()
calls, and pulling the branch started by user @nanuxbe to master, I was able to install successfully using pip install git+https://github.com/iannesbitt/django-graphos.git
. Of course shortly after that, I discovered that there was a working python-graphos-3
available through pip, which essentially made my clone and pull meaningless, but hey, it works.
I'm the one who pushed the python3 compatible version to pip, but it was very shoddily done for my own purposes. I will try to merge these pull requests on this repo to mine, and then push all of these updates to pip.
Thank you @ModusVivendi
python-graphos-3 on pip, which is my fork at https://github.com/ModusVivendi/django-graphos , is now updated with the most recent pull requests from this repo that could be auto merged.
setup.py has been changed to make it Python3 compatible and we have uploaded it to pypi. pip install django-graphos should now work with Python3.