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

[BUG] Error when install on Ubuntu 24.04 #24

Open
thedrint opened this issue Feb 12, 2024 · 1 comment
Open

[BUG] Error when install on Ubuntu 24.04 #24

thedrint opened this issue Feb 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@thedrint
Copy link

Describe the bug
Try to install Ash via sudo pip3 install ash-editor as described in ash readme. Got big error message:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. 
You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Do I really need venv and do other things for Ash? Excuse me for such questions, I'm newbie in python.

Desktop (please complete the following information):

  • OS: Ubuntu 24.04
  • Version: from python repo
@thedrint thedrint added the bug Something isn't working label Feb 12, 2024
@thedrint
Copy link
Author

UPD: Try to install via pipx, as python suggests — got non-working Ash:-)

$ ash
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
/home/user/.pyxbld/temp.linux-x86_64-3.11/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/core/screen.c:28:10: fatal error: Python.h: Нет такого файла или каталога
   28 | #include "Python.h"
      |          ^~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
  File "/usr/lib/python3.11/distutils/unixccompiler.py", line 117, in _compile
    self.spawn(compiler_so + cc_args + [src, '-o', obj] +
  File "/usr/lib/python3.11/distutils/ccompiler.py", line 910, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/usr/lib/python3.11/distutils/spawn.py", line 91, in spawn
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/_pyximport3.py", line 314, in create_module
    so_path = build_module(spec.name, pyxfilename=spec.origin, pyxbuild_dir=self._pyxbuild_dir,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/_pyximport3.py", line 197, in build_module
    so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/pyxbuild.py", line 103, in pyx_to_dll
    dist.run_commands()
  File "/usr/lib/python3.11/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.11/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/Cython/Distutils/build_ext.py", line 135, in build_extension
    super(build_ext, self).build_extension(ext)
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 529, in build_extension
    objects = self.compiler.compile(sources,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/usr/lib/python3.11/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/bin/ash", line 5, in <module>
    from ash.ash_main import run
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/ash_main.py", line 11, in <module>
    from ash.main import *
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/main.py", line 30, in <module>
    from ash.gui.topLevelWindow import *
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/gui/topLevelWindow.py", line 12, in <module>
    from ash.gui.windowManager import *
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/gui/windowManager.py", line 10, in <module>
    from ash.gui.editor import *
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/ash/gui/editor.py", line 16, in <module>
    from ash.core.screen import *
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/_pyximport3.py", line 332, in create_module
    raise exc.with_traceback(tb)
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/_pyximport3.py", line 314, in create_module
    so_path = build_module(spec.name, pyxfilename=spec.origin, pyxbuild_dir=self._pyxbuild_dir,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/_pyximport3.py", line 197, in build_module
    so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/pyximport/pyxbuild.py", line 103, in pyx_to_dll
    dist.run_commands()
  File "/usr/lib/python3.11/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.11/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/user/.local/share/pipx/venvs/ash-editor/lib/python3.11/site-packages/Cython/Distutils/build_ext.py", line 135, in build_extension
    super(build_ext, self).build_extension(ext)
  File "/usr/lib/python3.11/distutils/command/build_ext.py", line 529, in build_extension
    objects = self.compiler.compile(sources,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/usr/lib/python3.11/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
ImportError: Building module ash.core.screen failed: ["distutils.errors.CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1\n"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants