SageMath 9.8 beta 4 build questions

66 views
Skip to first unread message

being nobody00

unread,
Nov 25, 2022, 12:10:52 AM11/25/22
to sage-devel
Dear SageMath,

SageMath 9.8 beta 4 failed to build on this system:

$ uname -a
Linux 4.4.0-17763-Microsoft #2268-Microsoft Thu Oct 07 16:36:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
$ which python3
/usr/bin/python3
$ python3 --version
Python 3.10.8
$ ~/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 --version
Python 3.10.8
$ wheel version
wheel 0.34.2
$ ~/sage-9.8/b4/b4.0/sage -pip list | grep 'wheel'
wheel                         0.37.1
$ ls -l ~/sage-9.8/b4/b4.0/logs/pkgs | wc -l
192

Questions:
  1. Is ~/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 freshly built or a "copy and paste" of  /usr/bin/python3? Can /usr/bin/python3 be used 'as is where is' for SageMath?

  2. Why different versions of "wheel"? ( 'wheel ' on this system was installed after SageMath 9.8 beta 4 was released and the version was decided by the system). Is version 0.37.1 better for SageMath 9.8 than 0.34.2

  3. Subsequent to a failed build (because of 'Error building a wheel for jupyter_jsmol-2022.1.0'), the build process always invokes make for 'sagelib-9.8.beta4' and 'sagemath_doc_html-none'. This takes about an hour on this system. Is this necessary? Can it be avoided?

  4. What does the option "--config-settings" do in the context of the following excerpt from the log file:

    "Package 'jupyter_jsmol' is currently not installed
    No legacy uninstaller found for 'jupyter_jsmol'; nothing to do
    Installing jupyter_jsmol-2022.1.0

    Usage:
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <requirement specifier> ...
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] -r <requirements file> ...
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] [-e] <vcs project url> ...
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] [-e] <local project path> ...
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <archive url/path> ...
                                                                                                                   
      /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <archive url/path> ...

    no such option: --config-settings
    ***********************************************************************************************************************************************
    Error building a wheel for jupyter_jsmol-2022.1.0
    ***********************************************************************************************************************************************

  5. Last but not least, how to debug and fix this issue with "Error installing package jupyter_jsmol-2022.1.0" on this system after going to the debug subshell? 

    From the log file:
    "If you want to try to fix the problem yourself, *don't* just cd to
    /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0 and type 'make' or whatever is appropriate.
    Instead, the following commands setup all environment variables
    correctly and load a subshell for you to debug the error:
      (cd '/home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0' && '/home/hph/sage-9.8/b4/b4.0/sage' --buildsh)
    When you are done debugging, you can type "exit" to leave the subshell."

Your help is greatly appreciated.

With best wishes and regards,

phi

Dima Pasechnik

unread,
Nov 25, 2022, 3:30:07 AM11/25/22
to sage-...@googlegroups.com
On Fri, Nov 25, 2022 at 5:10 AM being nobody00 <beingn...@gmail.com> wrote:
>
> Dear SageMath,
>
> SageMath 9.8 beta 4 failed to build on this system:
>
> $ uname -a
> Linux 4.4.0-17763-Microsoft #2268-Microsoft Thu Oct 07 16:36:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
> $ which python3
> /usr/bin/python3
> $ python3 --version
> Python 3.10.8
> $ ~/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 --version
> Python 3.10.8
> $ wheel version
> wheel 0.34.2
> $ ~/sage-9.8/b4/b4.0/sage -pip list | grep 'wheel'
> wheel 0.37.1
> $ ls -l ~/sage-9.8/b4/b4.0/logs/pkgs | wc -l
> 192
>
> Questions:
>
> Is ~/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 freshly built or a "copy and paste" of /usr/bin/python3? Can /usr/bin/python3 be used 'as is where is' for SageMath?

As you see, this is a venv. It can be either case, built or system python3.
You can look at the logs/pkgs/python3* and/or in local/bin/python3 to
see whether Sage built python3.
Or start

./sage -sh

and at its prompt type

which python3

Sage uses venv to isolate the system installed python3's packages,
and replace them with what's supplied by Sage,
as well as install more.
E.g., as non-root typically cannot write to the location of system
python3's packages.

At the moment we support using "system" python packages in Conda
environments, see
https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-library-experimental

Probably this may be adapted to use the usual system python packages
(then you'd need to build as root, and potentially destroy your
OS installation, as it might rely on your system python for crucial tasks.

>
> Why different versions of "wheel"? ( 'wheel ' on this system was installed after SageMath 9.8 beta 4 was released and the version was decided by the system). Is version 0.37.1 better for SageMath 9.8 than 0.34.2

0.37.1 is the one we know works with all Sage's packages' versions.
0.34 - probably does not.

>
> Subsequent to a failed build (because of 'Error building a wheel for jupyter_jsmol-2022.1.0'), the build process always invokes make for 'sagelib-9.8.beta4' and 'sagemath_doc_html-none'. This takes about an hour on this system. Is this necessary? Can it be avoided?
>
> What does the option "--config-settings" do in the context of the following excerpt from the log file:
>
> "Package 'jupyter_jsmol' is currently not installed
> No legacy uninstaller found for 'jupyter_jsmol'; nothing to do
> Installing jupyter_jsmol-2022.1.0
>
> Usage:
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <requirement specifier> ...
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] -r <requirements file> ...
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] [-e] <vcs project url> ...
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] [-e] <local project path> ...
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <archive url/path> ...
>
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/bin/python3 -m pip wheel [options] <archive url/path> ...
>
> no such option: --config-settings
> ***********************************************************************************************************************************************
> Error building a wheel for jupyter_jsmol-2022.1.0
> ***********************************************************************************************************************************************
>
> Last but not least, how to debug and fix this issue with "Error installing package jupyter_jsmol-2022.1.0" on this system after going to the debug subshell?

No idea why it's broken - please post the latest logs/pkgs/jmol-*.log here.


>
> From the log file:
> "If you want to try to fix the problem yourself, *don't* just cd to
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0 and type 'make' or whatever is appropriate.
> Instead, the following commands setup all environment variables
> correctly and load a subshell for you to debug the error:
> (cd '/home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0' && '/home/hph/sage-9.8/b4/b4.0/sage' --buildsh)
> When you are done debugging, you can type "exit" to leave the subshell."
>
> Your help is greatly appreciated.
>
> With best wishes and regards,
>
> phi
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a4587dfd-fa28-480f-a064-3dda0d37f51dn%40googlegroups.com.

being nobody00

unread,
Nov 25, 2022, 4:49:51 AM11/25/22
to sage-devel
Hi,

>  please post the latest logs/pkgs/jmol-*.log here.
Please find attached 'jmol-14.29.52.log.7z'

Best regards,

phi
jmol-14.29.52.log.7z

Dima Pasechnik

unread,
Nov 25, 2022, 5:12:24 AM11/25/22
to sage-...@googlegroups.com
On Fri, Nov 25, 2022 at 9:49 AM being nobody00 <beingn...@gmail.com> wrote:
>
> Hi,
>
> > please post the latest logs/pkgs/jmol-*.log here.
> Please find attached 'jmol-14.29.52.log.7z'

Sorry, I meant all logs/pkgs/*jmol-*.log
- it's not jmol's bug, most likely, but the wheel building of the
corresponding python package
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/10136c62-0161-47de-aadd-0d21c087f85dn%40googlegroups.com.

being nobody00

unread,
Nov 25, 2022, 5:45:30 AM11/25/22
to sage-devel
Sorry, that's all there is in here:

~/sage-9.8/b4/b4.0$ ls -l logs/pkgs/*jmol*
-rw-rw-rw- 1 hph hph 2856 Nov 23 18:05 logs/pkgs/jmol-14.29.52.log

~/sage-9.8/b4/b4.0$ ls -l logs/pkgs/*wheel*
-rw-rw-rw- 1 hph hph 62807 Nov 23 18:30 logs/pkgs/setuptools_wheel-65.4.0.log
-rw-rw-rw- 1 hph hph 18301 Nov 23 18:29 logs/pkgs/wheel-0.37.1.log

Please find attached also 'jupyter_jsmol-2022.1.0.log.7z' and 'all_wheel_logs.7z', just in case.
jupyter_jsmol-2022.1.0.log.7z
all_wheel_logs.7z

Dima Pasechnik

unread,
Nov 25, 2022, 6:14:44 AM11/25/22
to sage-...@googlegroups.com
On Fri, Nov 25, 2022 at 5:10 AM being nobody00 <beingn...@gmail.com> wrote:
>
This seems to indicate that you're using incorrect version of wheel or/and pip.

If you start ./sage -sh
what's the output of

python3 -m pip wheel --help | grep config

run at this prompt?

It should be

--config-settings <settings>
KEY=VALUE. Use multiple --config-settings
environment variables and user configuration.


> ***********************************************************************************************************************************************
> Error building a wheel for jupyter_jsmol-2022.1.0
> ***********************************************************************************************************************************************
>
> Last but not least, how to debug and fix this issue with "Error installing package jupyter_jsmol-2022.1.0" on this system after going to the debug subshell?
>
> From the log file:
> "If you want to try to fix the problem yourself, *don't* just cd to
> /home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0 and type 'make' or whatever is appropriate.
> Instead, the following commands setup all environment variables
> correctly and load a subshell for you to debug the error:
> (cd '/home/hph/sage-9.8/b4/b4.0/local/var/lib/sage/venv-python3.10.8/var/tmp/sage/build/jupyter_jsmol-2022.1.0' && '/home/hph/sage-9.8/b4/b4.0/sage' --buildsh)
> When you are done debugging, you can type "exit" to leave the subshell."
>
> Your help is greatly appreciated.
>
> With best wishes and regards,
>
> phi
>

Dima Pasechnik

unread,
Nov 25, 2022, 6:20:34 AM11/25/22
to sage-devel
It could be that at this point for some reason Sage's wheel package wasn't built yet.
Can you run

make wheel && make jupyter_jsmol

being nobody00

unread,
Nov 25, 2022, 7:48:31 AM11/25/22
to sage-devel
> make wheel && make jupyter_jsmol

It looks like 'wheel' is up to date (no changes in timestamps of log files):
~/sage-9.8/b4/b4.0$ ls -l logs/pkgs/*wheel*
-rw-rw-rw- 1 hph hph 62807 Nov 23 18:30 logs/pkgs/setuptools_wheel-65.4.0.log
-rw-rw-rw- 1 hph hph 18301 Nov 23 18:29 logs/pkgs/wheel-0.37.1.log

'jupyter_jsmol-2022.1.0.log' is newly created: (and the build failed as before)

~/sage-9.8/b4/b4.0$ ls -l logs/pkgs/*jupyter_jsmol*
-rw-rw-rw- 1 hph hph 29904 Nov 25 06:54 logs/pkgs/jupyter_jsmol-2022.1.0.log

being nobody00

unread,
Nov 25, 2022, 7:48:31 AM11/25/22
to sage-devel
> If you start ./sage -sh

(sage-sh):b4.0$ pip --version
pip 22.0.2 from /home/hph/.sage/local/lib/python3.10/site-packages/pip (python 3.10)
(sage-sh):b4.0$ wheel version
wheel 0.37.1
(sage-sh):b4.0$ python3 -m pip wheel --help | grep config

                              environment variables and user configuration.

being nobody00

unread,
Nov 25, 2022, 8:20:58 AM11/25/22
to sage-devel
P.S: FWIW, from outside the  (sage-sh)  subshell , using system python3.10, pip (version 22.1.1) and wheel (version 0.34.2)

~/sage-9.8/b4/b4.0$ python3 -m pip wheel --help | grep config

  --config-settings <settings>
                              KEY=VALUE. Use multiple --config-settings
                              environment variables and user configuration.

This is the expected output for the command from inside the (sage-sh) subshell.

Recalling that from inside (sage-sh) subshell, the output was:

(sage-sh):b4.0$ python3 -m pip wheel --help | grep config

                              environment variables and user configuration.


Dima Pasechnik

unread,
Nov 25, 2022, 8:26:39 AM11/25/22
to sage-...@googlegroups.com
On Fri, Nov 25, 2022 at 12:48 PM being nobody00 <beingn...@gmail.com> wrote:
>
> > If you start ./sage -sh
>
> (sage-sh):b4.0$ pip --version
> pip 22.0.2 from /home/hph/.sage/local/lib/python3.10/site-packages/pip (python 3.10)

this is wrong pip! (there should be no local/ in your ~/.sage/ at all)

pip should be in ~/sage-9.8/b4/b4.0/local/......

Can you remove ~/.sage/local/ ?

being nobody00

unread,
Nov 25, 2022, 9:54:36 AM11/25/22
to sage-devel
Hi,

>  Can you remove ~/.sage/local/ ?

This seems to fix the problem,  SageMath 9.8 beta 4 has been successfully built.

Thank you so much for your help.

Best regards,

phi
Reply all
Reply to author
Forward
0 new messages