As I wrote in the ticket I'm not exactly sure what you're using a virtualenv for.
To be clear, I think it's great to use virtualenv for development in general. But I think this will only confuse things when building SAGE-THE-DISTRIBUTION from scratch since everything should get installed into $SAGE_LOCAL. So I'm not sure what you're doing with a virtualenv or why. On Thu, Jun 30, 2016 at 3:29 PM, Frédéric Chapoton <fchapot...@gmail.com> 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 sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.