O
O
Oscar Django2015-02-04 21:31:16
Django
Oscar Django, 2015-02-04 21:31:16

How to make django (django-oscar) and python3 friends?

Who about what, but I, as always, about django-oscar. Although to a large extent just about django.
Decided to try python3. django-oscar supports it, django supports it.
OS: elementary OS "Luna" (build on Ubuntu 12.04) python
:
python3.2
pip install django-oscar
nothing more, just what django-oscar pulls with itself:

Babel (1.3)
Django (1.7.4)
django-appconf (0.6)
django-compressor (1.4)
django-extra-views (0.6.4)
django-haystack (2.3.1)
django-oscar (1.0.1)
django-tables2 (0.15.0)
django-treebeard (2.0)
factory-boy (2.4.1)
mock (1.0.1)
phonenumbers (6.3.0)
Pillow (2.4.0)
pip (6.0.6)
purl (1.0.3)
pytz (2014.10)
setuptools (11.0)
six (1.9.0)
sorl-thumbnail (11.12.1b0)
Unidecode (0.4.17)

Everything works fine, no problems. But on startup it complains:
File "/home/ddd/.virtualenvs/python32/lib/python3.2/site-packages/haystack/utils/__init__.py", line 28
    raise AttributeError(u"Provided string '%s' is not a valid identifier." % obj_or_string)

namely the prefix u''.
django-haystack claims to support python3.3+
Okay, install python3.4:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.4

Install django-oscar:
pip install django-oscar
UPDATE The following lines are removed from italics, already decided.

And we get a new joy (Pillow does not want to be friends with python3.4):
_imaging.c:76:20: фатальная ошибка: Python.h: Нет такого файла или каталога
    компиляция прервана.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Which python has a chance to finish what you started (python3.2 vs python3.4)?
PS everything is put in virtualenv using virtualenvwrapper:
mkvirtualenv -p /usr/bin/python3 python32
mkvirtualenv -p /usr/bin/python3.4 python34

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oscar Django, 2015-02-04
@winordie

Sorry for the distraction. On python3.4 everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question