Error while installing erpnext app

I’am getting an issue when trying to run $ bench get-app erpnext.

Getting erpnext
$ git clone --branch version-14 --depth 1 --origin upstream
Cloning into 'erpnext'...
remote: Enumerating objects: 4866, done.
remote: Counting objects: 100% (4866/4866), done.
remote: Compressing objects: 100% (4118/4118), done.
remote: Total 4866 (delta 969), reused 2292 (delta 517), pack-reused 0
Receiving objects: 100% (4866/4866), 17.13 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (969/969), done.
Updating files: 100% (4540/4540), done.
Ignoring dependencies of erpnext. To install dependencies use --resolve-deps
Installing erpnext
$ /home/frappe/erpnext/env/bin/python3.10 -m pip install --quiet --upgrade -e /home/frappe/erpnext/apps/erpnext 
  error: subprocess-exited-with-error
  × Running install for jsonobject did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      You are running without Cython installed. It is highly recommended to run
        pip install cython>=0.29.21,<1.0.0
      before you continue
      /home/frappe/erpnext/env/lib/python3.10/site-packages/setuptools/config/ SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /home/frappe/erpnext/env/lib/python3.10/site-packages/setuptools/ SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
      WARNING: The wheel package is not available.
      Warning: 'classifiers' should be a list, got type 'tuple'
      running install
      /home/frappe/erpnext/env/lib/python3.10/site-packages/setuptools/command/ SetuptoolsDeprecationWarning: install is deprecated. Use build and pip and other standards-based tools.
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/jsonobject
      copying jsonobject/ -> build/lib.linux-x86_64-cpython-310/jsonobject
      copying jsonobject/ -> build/lib.linux-x86_64-cpython-310/jsonobject
      running build_ext
      building 'jsonobject.api' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/jsonobject
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/frappe/erpnext/env/include -I/usr/include/python3.10 -c jsonobject/api.c -o build/temp.linux-x86_64-cpython-310/jsonobject/api.o
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> jsonobject

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Traceback (most recent call last):
  File "/home/frappe/.local/bin/bench", line 8, in <module>
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/", line 127, in cli
  File "/home/frappe/.local/lib/python3.10/site-packages/click/", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/.local/lib/python3.10/site-packages/click/", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/", line 159, in get_app
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/", line 432, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/", line 230, in install
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/", line 561, in install_app
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/", line 155, in exec_cmd
    raise CommandFailedError

I’ve installed cython with the specified version $ pip install "cython==0.29.21"
But nothing work till now

Fixed by installing sudo apt install python3-venv virtualenv for python-3.0