Virtual env related Error when trying to install ERPNext

Error when running this command
bench init frappe-bench --frappe-branch version-13

Here is the error stack

Setting Up Environment
$ /usr/bin/virtualenv --quiet env -p python3
/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
$ /home/bench/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/bench/commands/make.py", line 70, in init
    init(
  File "/usr/local/lib/python3.9/dist-packages/bench/utils/render.py", line 95, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/bench/utils/system.py", line 65, in init
    bench.setup.env(python=python)
  File "/usr/local/lib/python3.9/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/bench/bench.py", line 360, in env
    self.pip()
  File "/usr/local/lib/python3.9/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/bench/bench.py", line 392, in pip
    return self.run(f"{self.bench.python} -m pip install {quiet_flag} --upgrade pip")
  File "/usr/local/lib/python3.9/dist-packages/bench/bench.py", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/usr/local/lib/python3.9/dist-packages/bench/utils/__init__.py", line 149, in exec_cmd
    return_code = subprocess.call(cmd, cwd=cwd, universal_newlines=True, env=env)
  File "/usr/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/bench/frappe-bench/env/bin/python'

Python Version: 3.10.5
virtualenv Version: 20.0.17
OS: Ubuntu 20.04

1 Like