Erpnext installation error Ubuntu 16.04

Hi team,
I am getting this error while running erpnext installation - and its fresh installation and I used easy install method.

Traceback (most recent call last):
File “/usr/lib/python3.5/”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/”, line 85, in _run_code
exec(code, run_globals)
File “/usr/local/lib/python3.5/dist-packages/pip/”, line 21, in
from pip._internal.cli.main import main as _main
File “/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/”, line 60
sys.stderr.write(f"ERROR: {exc}")
SyntaxError: invalid syntax
Traceback (most recent call last):
File “”, line 487, in
File “”, line 174, in install_prerequisites
‘python3’: “sudo -H python3 -m pip install --upgrade pip setuptools-rust”
File “”, line 141, in run_os_command
returncode = subprocess.check_call(command, shell=True, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.5/”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘sudo -H python3 -m pip install --upgrade pip setuptools-rust’ returned non-zero exit status 1

1 Like

For more videos,

1 Like

Did you manage to overcome this?

@Sathams_Tech_TV, I was able to resolve this by doing the following:

  1. sudo apt-get remove --purge python3-pip
  2. sudo apt-get install curl
  3. curl -O (depending on the python version you have, just check the bootstrap directory and choose the right folder/version you have)
  4. sudo -E python3
  5. sudo -H python3 -m pip install --upgrade pip setuptools-rust
  6. sudo apt-get install python3-pip

I get errors when I run sudo -E python3

Traceback (most recent call last):
File “”, line 23974, in
File “”, line 199, in main
File “”, line 121, in bootstrap
import setuptools # noqa
File “/usr/local/lib/python3.5/dist-packages/setuptools/”, line 18, in
from setuptools.dist import Distribution
File “/usr/local/lib/python3.5/dist-packages/setuptools/”, line 585
license_files: Optional[List[str]] = self.metadata.license_files