Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from sage.misc.banner import banner ModuleNotFoundError: No module named 'sage' #36360

Open
2 tasks done
gq1378 opened this issue Sep 29, 2023 · 7 comments
Open
2 tasks done

Comments

@gq1378
Copy link

gq1378 commented Sep 29, 2023

Steps To Reproduce

in wsl kali on win11, try to install sage, version: 10.1

  1. apt install the prerequisites
  2. install sage following: Alternative Installation using PyPI
    $ python3 -m pip install sage_conf
    $ ls $(sage-config SAGE_SPKG_WHEELS)
    $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl
    $ python3 -m pip install sagemath-standard
  3. type sage, then this happens:
    Traceback (most recent call last):
    File "/home/kali/.local/bin/sage-ipython", line 9, in
    from sage.misc.banner import banner
    ModuleNotFoundError: No module named 'sage'
  4. however, type sage-ipython, sage starts normally.

Expected Behavior

run sage should start sage like run sage-ipython

Actual Behavior

can run sage-ipython but not sage

Additional Information

I don't wanna have to type sage-ipython to start sage every time

Environment

- **OS**: in wsl kali on win11
- **Sage Version**: 10.1 (pypi)

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@gq1378 gq1378 added the t: bug label Sep 29, 2023
@gq1378
Copy link
Author

gq1378 commented Sep 29, 2023

I've tried something and discovered a pattern:

ordinary python modules are installed in /usr/lib/python3/dist-packages while sage related modules are installed in /home/kali/.local/lib/python3.11/site-packages, if following the official pip installation guide.

So when I launch python or sage-ipython, python can load all modules from both directory, however when I try launching sage, python can only see modules from /usr/lib/python3/dist-packages(sage module not there), causing No module named 'sage' error.

I think it's weird and I don't know how to correct this..

@mkoeppe
Copy link
Member

mkoeppe commented Oct 9, 2023

Please try if sage-conf==10.2b6 has fixed this (via #36367)

@gq1378
Copy link
Author

gq1378 commented Oct 9, 2023

Sure.
Do I need a full reinstallation(upgrade sage-standard also) or just reinstallation of sage_conf?

I tried python3 -m pip install sage_conf==10.2b6 and ModuleNotFoundError: No module named 'hatchling' error occurred, then I tried pip3 install hatchling, it said already installed, then I tried pip3 install -U hatchling and tried python3 -m pip install sage_conf==10.2b6 again and this time succeeded.

but the No module named 'sage' problem remains. And then I type these:

$ ls $(sage-config SAGE_SPKG_WHEELS)
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl

I type sage, the problem remains. Then I type:
$ python3 -m pip install -U sagemath-standard
It takes about 3 seconds and it seems this takes no effect (probably because sagemath-standard is already installed?)

And the problem remains. What do I do next? Do I need to uninstall the old sagemath-standard first? Do I need to use something like $ python3 -m pip install sagemath-standard==10.2.xx?

@gq1378
Copy link
Author

gq1378 commented Oct 11, 2023

@mkoeppe I then tried python3 -m pip install sagemath-standard==10.2b6 and it said ModuleNotFoundError: No module named 'setuptools', however setuptools is already installed. These are the full error outputs:

ERROR: Exception:
Traceback (most recent call last):
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
           ^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
                ^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in __init__
    super().__init__(
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 538, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 653, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 48, in prepare_distribution_metadata
    self._install_build_reqs(finder)
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 118, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 95, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 697, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'
$ pip3 list|grep setuptools
setuptools                     68.2.2
setuptools-scm                 7.0.5
setuptools-scm-git-archive     1.4

@mkoeppe
Copy link
Member

mkoeppe commented Oct 25, 2023

I then tried python3 -m pip install sagemath-standard==10.2b6 and it said ModuleNotFoundError: No module named 'setuptools', however setuptools is already installed.

Note that by default, pip builds packages using build isolation; already installed packages are not visible during the build.
This does not fully explain the error, but you could try pip install -U --no-build-isolation --pre sagemath-standard or pip install --no-build-isolation sagemath-standard==10.2.beta8.

By the way, over in #36533, I'm fixing a few things related to this mode of installation.

@gq1378
Copy link
Author

gq1378 commented Oct 29, 2023

but you could try pip install -U --no-build-isolation --pre sagemath-standard or pip install --no-build-isolation sagemath-standard==10.2.beta8.

@mkoeppe when I install sage_conf python3 -m pip install sage_conf==10.2b8, the first error in the log says No such file or directory: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/.upstream.d'

make[2]: Entering directory '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/make'
      make[2]: warning: -j8 forced in submake: resetting jobserver mode.
      make --no-print-directory /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy
      make[3]: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy' is up to date.
      make --no-print-directory /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy
      make[3]: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy' is up to date.
      make --no-print-directory /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy
      make[3]: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy' is up to date.
      make --no-print-directory /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy
      make[3]: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/installed/.dummy' is up to date.
      make --no-print-directory all-sage
      make --no-print-directory combinatorial_designs-SAGE_LOCAL-no-deps
      /usr/bin/python3 /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/sage-venv  "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/venv-python3.11"
      make --no-print-directory gc-SAGE_LOCAL-no-deps
      make --no-print-directory info-SAGE_LOCAL-no-deps
      make --no-print-directory givaro-SAGE_LOCAL-no-deps
      make --no-print-directory fplll-SAGE_LOCAL-no-deps
      make --no-print-directory gap-SAGE_LOCAL-no-deps
      make --no-print-directory graphs-SAGE_LOCAL-no-deps
      [info-6.8] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/info-6.8.log
      [givaro-4.1.1] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/givaro-4.1.1.log
      [fplll-5.4.4] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/fplll-5.4.4.log
      rm -f "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/venv-python3.11/var/lib/sage/installed"/python3_venv-*
      [combinatorial_designs-20140630.p0] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/combinatorial_designs-20140630.p0.log
      [gc-8.2.4] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/gc-8.2.4.log
      touch "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/local/var/lib/sage/venv-python3.11/var/lib/sage/installed/python3_venv-3.11--usr-bin-python3"
      [gap-4.12.2] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/gap-4.12.2.log
      make --no-print-directory jmol-SAGE_LOCAL-no-deps
      [graphs-20210214.p0] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/graphs-20210214.p0.log
      [jmol-14.29.52] installing. Log file: /home/kali/.sage/sage-10.2.beta8-Linux-x86_64/logs/pkgs/jmol-14.29.52.log
        [gc-8.2.4] error installing, exit status 1. End of log file:
        [combinatorial_designs-20140630.p0] error installing, exit status 1. End of log file:
        [gc-8.2.4]   Attempting to download package gc-8.2.4.tar.gz from mirrors
        [gc-8.2.4]   ************************************************************************
        [gc-8.2.4]   Traceback (most recent call last):
        [gc-8.2.4]     File "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/../sage_bootstrap/download/cmdline.py", line 126, in run_safe
        [gc-8.2.4]       run()
        [gc-8.2.4]     File "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/../sage_bootstrap/download/cmdline.py", line 108, in run
        [gc-8.2.4]       app.download_tarball(args.url_or_tarball, args.destination, args.allow_upstream)
        [gc-8.2.4]     File "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/../sage_bootstrap/download/app.py", line 41, in download_tarball
        [gc-8.2.4]       tarball.download(allow_upstream=allow_upstream)
        [gc-8.2.4]     File "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/../sage_bootstrap/tarball.py", line 161, in download
        [gc-8.2.4]       for mirror in MirrorList():
        [gc-8.2.4]                     ^^^^^^^^^^^^
        [gc-8.2.4]     File "/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/build/bin/../sage_bootstrap/download/mirror_list.py", line 49, in __init__
        [gc-8.2.4]       for fname in sorted(os.listdir(upstream_d)):
        [gc-8.2.4]                           ^^^^^^^^^^^^^^^^^^^^^^
        [gc-8.2.4]   FileNotFoundError: [Errno 2] No such file or directory: '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64/.upstream.d'
        [gc-8.2.4]   ************************************************************************
        [gc-8.2.4]   ************************************************************************
        [gc-8.2.4]   Error downloading gc-8.2.4.tar.gz
        [gc-8.2.4]   ************************************************************************

and the end error is NameError: name 'DistutilsSetupError' is not defined

make[1]: *** [Makefile:40: all-build] Error 1
      make[1]: Leaving directory '/home/kali/.sage/sage-10.2.beta8-Linux-x86_64'
      make: *** [Makefile:16: build] Error 2
      Traceback (most recent call last):
        File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/kali/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 136, in <module>
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-9ifxjpks/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 79, in run
      NameError: name 'DistutilsSetupError' is not defined
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for sage_conf
Failed to build sage_conf
ERROR: Could not build wheels for sage_conf, which is required to install pyproject.toml-based projects

I looked at the files in both sage-10.1-Linux-x86_64 and sage-10.2.beta8-Linux-x86_64, there's only upstream directory, no .upstream.d. But sage-10.1 can be installed normally without this error.

@kands-code
Copy link

In version 10.4, I encountered a similar problem, and the error was as follows:

Traceback (most recent call last):
  File "/home/kands/.local/sdk/sage/bin/sage-config", line 5, in <module>
    from sage_conf import _main
ModuleNotFoundError: No module named 'sage_conf'
Traceback (most recent call last):
  File "/home/kands/.local/sdk/sage/bin/sage-config", line 5, in <module>
    from sage_conf import _main
ModuleNotFoundError: No module named 'sage_conf'
/home/kands/.local/sdk/sage/bin/sage-venv-config:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.4')
Traceback (most recent call last):
  File "/home/kands/.local/sdk/sage/bin/sage-venv-config", line 4, in <module>
    __import__('pkg_resources').require('sagemath-standard==10.4')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3291, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3266, in _call_aside
    f(*args, **kwargs)
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3304, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 600, in _build_master
    ws.require(__requires__)
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 937, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 798, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 839, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'sagemath-standard==10.4' distribution was not found and is required by the application
/home/kands/.local/sdk/sage/bin/sage-ipython:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.4')
Traceback (most recent call last):
  File "/home/kands/.local/sdk/sage/bin/sage-ipython", line 4, in <module>
    __import__('pkg_resources').require('sagemath-standard==10.4')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3291, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3266, in _call_aside
    f(*args, **kwargs)
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 3304, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 600, in _build_master
    ws.require(__requires__)
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 937, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 798, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/kands/.local/sdk/sage/lib/python3.12/site-packages/pkg_resources/__init__.py", line 839, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'sagemath-standard==10.4' distribution was not found and is required by the application

I don't know how to solve this problem. Is this problem solved in the dev version (i.e. v10.5)?

system info: ArchLinux
sage: 10.4,installed from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants