It wouldn't surprise me too much if you can' t build python2 inside a
python 3 venv. Its pretty low on the priority of things to support imho.
Try building with SAGE_PYTHON3=yes
On Thursday, June 30, 2016 at 3:29:25 PM UTC+2, Frédéric Chapoton wrote:
>
> Hello everybody,
>
> I am trying to build sage with python3 (I asked for help here before, but
> got only little).
>
> It fails, of course (see log below for "make build"). I would like to
> understand how.
>
> I am in a python3 virtualenv, and SAGE_ROOT/local/bin/python launches a
> python3
>
> This python3 complains that it cannot find pkg_resources, as follows (from
> the shell)
>
> ./local/bin/python -c 'import pkg_resources;
> pkg_resources.get_distribution("matplotlib").version'
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named 'pkg_resources'
>
> but instead it seems to pick the py2 pkg_resources, when called inside the
> sage-env script.
>
> Any idea ? By the way, please review
> https://trac.sagemath.org/ticket/20909 and
> https://trac.sagemath.org/ticket/20910, which are needed to reach this
> point.
>
> Frederic
>
> sage-logger -p 'sage-spkg python2-2.7.10.p2'
> '/home/chapoton/sage3/logs/pkgs/python2-2.7.10.p2.log'
> [python2-2.7.10.p2] /home/chapoton/sage3/src/bin/sage-env: line 402: 24023
> Aborted (core dumped) "$SAGE_ROOT/local/bin/python" -c
> 'import pkg_resources;
> pkg_resources.get_distribution("matplotlib").version' 2> /dev/null
> [python2-2.7.10.p2] Found local metadata for python2-2.7.10.p2
> [python2-2.7.10.p2] Fatal Python error: Py_Initialize: Unable to get the
> locale encoding
> [python2-2.7.10.p2] File
> "/home/chapoton/sage3/local/lib/python/encodings/__init__.py", line 123
> [python2-2.7.10.p2] raise CodecRegistryError,\
> [python2-2.7.10.p2] ^
> [python2-2.7.10.p2] SyntaxError: invalid syntax
> [python2-2.7.10.p2]
> [python2-2.7.10.p2] Current thread 0x00007f7b54334700 (most recent call
> first):
> [python2-2.7.10.p2] /home/chapoton/sage3/build/bin/sage-spkg: line 425:
> 24057 Aborted (core dumped) sage-download-file
> $PKG_NAME_UPSTREAM
> Makefile:2432 : la recette pour la cible «
> /home/chapoton/sage3/local/var/lib/sage/installed/python2-2.7.10.p2 » a
> échouée
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.