Hi, few thing you ought to consider with your setup. We presently don't really support installing Sage in a venv (this is being worked on, but it's far from being ready for general use)
Basically, Sage will create its own venv instead. Then, we're not supporting Python 3.13 yet. You can use 3.12 instead, then it will be used. (and not built from sources, something which is broken on macOS a.t.m.) It seems you're using Homebrew, no? You certainly don't need to build "patch" then, just install a Homebrew patch. The way to use it with as many packages it has, not only non-python ones, is to run source .homebrew-build-env # needed anyway and run ./configure ---enable-system-site-packages # site is for Python packages in the env. of your python3 HTH Dima On Thursday, February 6, 2025 at 3:24:46 AM UTC-6 mwi...@gmail.com wrote: > Just discovered SageMath. Wonderful! Did a PhD thesis fifty(!) years > ago using MACSYMA over a dialup connection to a TIP and the ARPANET :-) > Great to see an alternative to Mathe$$$ica. > Installing on old MacBook Pro 11,3 (mid-2013) running Sonoma 15.2 (patched > with OCLP 2.2.0). Just upgraded my Python installation to 13.3.2, ran your > source install with that in a venv. Fumbled along a bit, but made it > through your configure steps. But when a did a make, it failed while > trying to download your patch2.7.6 (See log snippet below). Complained > about certificate issues. Notes: 1. I do have a GitHub account, but that > probably wasn't involved. 2. I did a fresh install of Python 13.3.2 from > the official site, INCLUDING the post instal script to update certificates, > but ended up not using that image and installed another copy using BREW > which put the binary in a more useful place wrt macOS and ZShell. > TIA, > Mike (excited to get SageMath running) > PS: Presume my problem will be obvious to you, so only including a bit of > the log. Can easily send more or try alternative steps. > ------------------------- > (pyvenv) mike@Mikes-MacBook-Pro-113 sage % make > make -j4 build/make/Makefile --stop > make[1]: `build/make/Makefile' is up to date. > build/bin/sage-logger \ > "cd build/make && ./install 'base-toolchain'" logs/install.log > *** ALL ENVIRONMENT VARIABLES BEFORE BUILD: *** > ACLOCAL_PATH= > > CPATH=/usr/local/opt/primesieve/include:/usr/local/opt/bdw-gc/include:/usr/local/opt/libpng/include:/usr/local/opt/polymake/include:/usr/local/opt/ntl/include:/usr/local/opt/bzip2/include:/usr/local/opt/readline/include:/usr/local/include:/usr/local/opt/primesieve/include:/usr/local/opt/bdw-gc/include:/usr/local/opt/libpng/include:/usr/local/opt/polymake/include:/usr/local/opt/ntl/include:/usr/local/opt/bzip2/include:/usr/local/opt/readline/include:/usr/local/include > CPPFLAGS=-I/usr/local/opt/openssl@3/include > CVXOPT_SUITESPARSE_INC_DIR=/usr/local/include/suitesparse > CVXOPT_SUITESPARSE_LIB_DIR=/usr/local/lib > GNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb > HOME=/Users/mike > LANG=en_US.UTF-8 > LDFLAGS=-L/usr/local/opt/openssl@3/lib > > LIBRARY_PATH=/usr/local/opt/primesieve/lib:/usr/local/opt/bdw-gc/lib:/usr/local/opt/libpng/lib:/usr/local/opt/polymake/lib:/usr/local/opt/ntl/lib:/usr/local/opt/bzip2/lib:/usr/local/opt/readline/lib:/usr/local/lib:/usr/local/opt/primesieve/lib:/usr/local/opt/bdw-gc/lib:/usr/local/opt/libpng/lib:/usr/local/opt/polymake/lib:/usr/local/opt/ntl/lib:/usr/local/opt/bzip2/lib:/usr/local/opt/readline/lib:/usr/local/lib > LOGNAME=mike > MAKE=make -j4 > MAKEFLAGS= V=1 > MAKELEVEL=1 > > MANPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man: > MFLAGS= > OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 > PATH=/Users/mike/sage/sage/build/bin:/Users/mike/sage/sage/src/bin:/Users/mike/sage/sage/local/bin:/usr/local/opt/polymake/bin:/usr/local/opt/texinfo/bin:/usr/local/opt/bzip2/bin:/usr/local/opt/polymake/bin:/usr/local/opt/texinfo/bin:/usr/local/opt/bzip2/bin:/Users/mike/.pyenv/shims:/usr/local/bin/:/Users/mike/Py3.13.2/pyvenv/bin:/usr/local/opt/openssl@3/bin:/usr/local/sbin:/usr/local/opt/ccache/libexec:/Library/Frameworks/Python.framework/Versions/3.13/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS:/Applications/VMware > > Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/Visual Studio > Code.app/Contents/Resources/app/bin:/Users/mike/gn:/Users/mike/go/bin > > PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/opt/zlib/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/opt/openssl@3/lib/pkgconfig > PWD=/Users/mike/sage/sage/build/make > PYENV_ROOT=/Users/mike/.pyenv > PYENV_SHELL=zsh > PYTHONPATH=/Users/mike/sage/sage/local > SAGE_ENV_CONFIG_SOURCED=1 > SAGE_LOCAL=/Users/mike/sage/sage/local > SAGE_LOGFILE=logs/install.log > SAGE_LOGS=/Users/mike/sage/sage/logs/pkgs > SAGE_NUM_THREADS=4 > SAGE_NUM_THREADS_PARALLEL=4 > SAGE_ORIG_PATH=/usr/local/opt/polymake/bin:/usr/local/opt/texinfo/bin:/usr/local/opt/bzip2/bin:/usr/local/opt/polymake/bin:/usr/local/opt/texinfo/bin:/usr/local/opt/bzip2/bin:/Users/mike/.pyenv/shims:/usr/local/bin/:/Users/mike/Py3.13.2/pyvenv/bin:/usr/local/opt/openssl@3/bin:/usr/local/sbin:/usr/local/opt/ccache/libexec:/Library/Frameworks/Python.framework/Versions/3.13/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS:/Applications/VMware > > Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/Visual Studio > Code.app/Contents/Resources/app/bin:/Users/mike/gn:/Users/mike/go/bin > SAGE_ORIG_PATH_SET=True > SAGE_PKGCONFIG=/Users/mike/sage/sage/local/lib/pkgconfig > SAGE_ROOT=/Users/mike/sage/sage > SAGE_SHARE=/Users/mike/sage/sage/local/share > SAGE_SRC=/Users/mike/sage/sage/src > SHELL=/bin/zsh > SHLVL=5 > SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.IbtgscA1Gu/Listeners > SU2_RUN=/usr/local/bin/ > TERM=xterm-256color > TERM_PROGRAM=Apple_Terminal > TERM_PROGRAM_VERSION=455 > TERM_SESSION_ID=3A754BB4-4919-4FBE-BDC5-909053096A6F > TMPDIR=/var/folders/77/vchmhm_92yg2wyqntn6snjjh0000gp/T/ > USER=mike > VIRTUAL_ENV=/Users/mike/Py3.13.2/pyvenv > VIRTUAL_ENV_PROMPT=pyvenv > XPC_FLAGS=0x0 > XPC_SERVICE_NAME=0 > ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb > ZPROFILETEST=was run > _=/usr/bin/env > __CFBundleIdentifier=com.apple.Terminal > __CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0 > *********************************************** > make --no-print-directory patch-SAGE_LOCAL-no-deps > [patch-2.7.6] Attempting to download package patch-2.7.6.tar.gz from > mirrors > [patch-2.7.6] > https://github.com/sagemath/sage/releases/download/10.6/patch-2.7.6.tar.gz > [patch-2.7.6] > [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] > [patch-2.7.6] ERROR [transfer|run:135]: [Errno socket error] [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] > https://github.com/sagemath/sage/releases/download/10.5/patch-2.7.6.tar.gz > [patch-2.7.6] > [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] > [patch-2.7.6] ERROR [transfer|run:135]: [Errno socket error] [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] > https://github.com/sagemath/sage/releases/download/10.4/patch-2.7.6.tar.gz > [patch-2.7.6] > [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] > [patch-2.7.6] ERROR [transfer|run:135]: [Errno socket error] [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] Downloading the Sage mirror list > [patch-2.7.6] CRITICAL [mirror_list|_refresh:238]: Downloading the mirror > list failed, using cached version > [patch-2.7.6] Attempting to download from > https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.gz > [patch-2.7.6] > [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] > [patch-2.7.6] ERROR [transfer|run:135]: [Errno socket error] [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] Traceback (most recent call last): > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", > > line 1787, in open > [patch-2.7.6] return getattr(self, name)(url) > [patch-2.7.6] ^^^^^^^^^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", > > line 1996, in open_https > [patch-2.7.6] return self._open_generic_http(self._https_connection, > url, data) > [patch-2.7.6] > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", > > line 1945, in _open_generic_http > [patch-2.7.6] http_conn.request("GET", selector, headers=headers) > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 1282, in request > [patch-2.7.6] self._send_request(method, url, body, headers, > encode_chunked) > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 1328, in _send_request > [patch-2.7.6] self.endheaders(body, encode_chunked=encode_chunked) > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 1277, in endheaders > [patch-2.7.6] self._send_output(message_body, > encode_chunked=encode_chunked) > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 1037, in _send_output > [patch-2.7.6] self.send(msg) > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 975, in send > [patch-2.7.6] self.connect() > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", > > line 1454, in connect > [patch-2.7.6] self.sock = self._context.wrap_socket(self.sock, > [patch-2.7.6] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", > line 517, in wrap_socket > [patch-2.7.6] return self.sslsocket_class._create( > [patch-2.7.6] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", > line 1075, in _create > [patch-2.7.6] self.do_handshake() > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", > line 1346, in do_handshake > [patch-2.7.6] self._sslobj.do_handshake() > [patch-2.7.6] ssl.SSLCertVerificationError: [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] > [patch-2.7.6] The above exception was the direct cause of the following > exception: > [patch-2.7.6] > [patch-2.7.6] Traceback (most recent call last): > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/tarball.py", line 185, > in download > [patch-2.7.6] Download(url, destination).run() > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/download/transfer.py", > line 137, in run > [patch-2.7.6] raise error > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/download/transfer.py", > line 128, in run > [patch-2.7.6] filename, info = opener.retrieve( > [patch-2.7.6] ^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", > > line 1821, in retrieve > [patch-2.7.6] fp = self.open(url, data) > [patch-2.7.6] ^^^^^^^^^^^^^^^^^^^^ > [patch-2.7.6] File > "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", > > line 1793, in open > [patch-2.7.6] raise OSError('socket error', msg) from msg > [patch-2.7.6] OSError: [Errno socket error] [SSL: > CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local > issuer certificate (_ssl.c:992) > [patch-2.7.6] > [patch-2.7.6] During handling of the above exception, another exception > occurred: > [patch-2.7.6] > [patch-2.7.6] Traceback (most recent call last): > [patch-2.7.6] File "/Users/mike/sage/sage/build/bin/sage-package", line > 40, in <module> > [patch-2.7.6] run() > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/cmdline.py", line 538, > in run > [patch-2.7.6] app.download_cls(*args.package_class, > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/app.py", line 337, in > download_cls > [patch-2.7.6] pc.apply(download_with_args) > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/expand_class.py", line > 126, in apply > [patch-2.7.6] function(package_name, *args, **kwds) > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/app.py", line 329, in > download_with_args > [patch-2.7.6] self.download(package, allow_upstream=allow_upstream) > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/app.py", line 315, in > download > [patch-2.7.6] package.tarball.download(allow_upstream=allow_upstream) > [patch-2.7.6] File > "/Users/mike/sage/sage/build/bin/../sage_bootstrap/tarball.py", line 187, > in download > [patch-2.7.6] raise FileNotMirroredError('tarball does not exist on > mirror network and neither at the upstream URL') > [patch-2.7.6] sage_bootstrap.tarball.FileNotMirroredError: tarball does > not exist on mirror network and neither at the upstream URL > [patch-2.7.6] > ************************************************************************ > [patch-2.7.6] Error downloading tarball of patch > [patch-2.7.6] > ************************************************************************ > [patch-2.7.6] Please email sage-devel ( > http://groups.google.com/group/sage-devel) > [patch-2.7.6] explaining the problem and including the log files > [patch-2.7.6] /Users/mike/sage/sage/logs/pkgs/patch-2.7.6.log > [patch-2.7.6] and > [patch-2.7.6] /Users/mike/sage/sage/config.log > [patch-2.7.6] Describe your computer, operating system, etc. > [patch-2.7.6] > ************************************************************************ > make[2]: *** [patch-SAGE_LOCAL-no-deps] Error 1 > make[1]: *** > [/Users/mike/sage/sage/local/var/lib/sage/installed/patch-2.7.6] Error 2 > *************************************************************** > Error building Sage. > > The following package(s) may have failed to build (not necessarily > during this run of 'make base-toolchain'): > > * package: patch-2.7.6 > last build time: Feb 5 23:44 > log file: /Users/mike/sage/sage/logs/pkgs/patch-2.7.6.log > > It is safe to delete any log files and build directories, but they > contain information that is helpful for debugging build problems. > WARNING: If you now run 'make' again, the build directory of the > same version of the package will, by default, be deleted. Set the > environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this. > > make: *** [base-toolchain] Error 1 > (pyvenv) mike@Mikes-MacBook-Pro-113 sage % > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-support/ba2f264b-31ad-4d37-a1fa-6f1dfd00cc46n%40googlegroups.com.