I am doing things inside a virtualenv because I do not want to destroy my sage installation (which happened once or twice) by trying to make sage with python3.
But if there is a better way, I am ready to listen. So far, despite my askings, nobody has told me "how to try to build sage using python3" and I had to figure things by myself. Frederic Le jeudi 30 juin 2016 17:13:13 UTC+2, Erik Bray a écrit : > > 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 <fchap...@gmail.com > <javascript:>> 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+...@googlegroups.com <javascript:>. > > To post to this group, send email to sage-...@googlegroups.com > <javascript:>. > > 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.