On Wed, Apr 23, 2025 at 11:07 AM Marc Culler <marc.cul...@gmail.com> wrote:

>  The venv directory gets named with the version of python used by the
> python3 spkg, even if the provided "system python" has a different
> version.  Using --with-sage-venv=no seemed to avoid that quirk, but somehow
> caused the sage build system to turn the sage/local directory into a venv
> which did not include pip.
>

For those who may be working on this project, here is the reason that the
sage venv did not contain pip, which makes it impossible to install any pip
packages.

The script sage/build/sage-venv instantiates an object of class
venv.EnvBuilder with:

b = venv.EnvBuilder(system_site_packages=options.system_site,
                    clear=options.clear,
                    upgrade=options.upgrade,
                    symlinks=True)

But the EnvBuilder constructor accepts another option named with_pip which
has default value False.  So the command above should be:

b = venv.EnvBuilder(system_site_packages=options.system_site,
                    clear=options.clear,
                    upgrade=options.upgrade,
                    with_pip=True,
                    symlinks=True)

although I am not sure I believe the comment in that script which claims
that symlinks=True is needed on macOS.

- Marc

-- 
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 view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/CALcZXRHQ93Gf9Lo48JQ5oy%3DbXgR1afU%2BiYXjYQuj1NzV3rU_7Q%40mail.gmail.com.

Reply via email to