frappe / frappe

Low code web framework for real world applications, in Python and Javascript
https://frappeframework.com
MIT License
7.26k stars 3.45k forks source link

Fail when installing frappe #20888

Open Kevhagi opened 1 year ago

Kevhagi commented 1 year ago

Description of the issue

Try to install new bench but always fail. I've tried uninstall wheel, cairocffi etc

Output of bench version

5.16.2

Stacktrace / full error message


➜  ~ bench init --frappe-branch v14.35.0 alfamindv4
Setting Up Environment
$ python3 -m venv env
$ /Users/kevinjayasusilo/alfamindv4/env/bin/python -m pip install --quiet --upgrade pip
$ /Users/kevinjayasusilo/alfamindv4/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch v14.35.0 --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 3184, done.
remote: Counting objects: 100% (3184/3184), done.
remote: Compressing objects: 100% (2859/2859), done.
remote: Total 3184 (delta 423), reused 1293 (delta 226), pack-reused 0
Receiving objects: 100% (3184/3184), 16.03 MiB | 218.00 KiB/s, done.
Resolving deltas: 100% (423/423), done.
Note: switching to 'c2e6c8ce2a6d6247573d3b0313766029aa0195bf'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Installing frappe
$ /Users/kevinjayasusilo/alfamindv4/env/bin/python -m pip install --quiet --upgrade -e /Users/kevinjayasusilo/alfamindv4/apps/frappe
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/setup.py", line 10, in <module>
          setup(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 110, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 118, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 162, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/.eggs/cffi-1.15.1-py3.10-macosx-10.9-universal2.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/.eggs/cffi-1.15.1-py3.10-macosx-10.9-universal2.egg/EGG-INFO'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cairocffi
  error: subprocess-exited-with-error

  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/setup.py", line 10, in <module>
          setup(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 110, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 118, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 162, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/.eggs/cffi-1.15.1-py3.10-macosx-10.9-universal2.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/.eggs/cffi-1.15.1-py3.10-macosx-10.9-universal2.egg/EGG-INFO'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for cairocffi
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/setup.py", line 13, in <module>
          setup(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 110, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 118, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 162, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/.eggs/charset_normalizer-3.1.0-py3.10-macosx-10.9-universal2.egg/charset_normalizer-3.1.0.dist-info' -> '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/.eggs/charset_normalizer-3.1.0-py3.10-macosx-10.9-universal2.egg/EGG-INFO'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for googlemaps
  error: subprocess-exited-with-error

  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/setup.py", line 13, in <module>
          setup(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 110, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 118, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinjayasusilo/alfamindv4/env/lib/python3.10/site-packages/setuptools/wheel.py", line 162, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/.eggs/charset_normalizer-3.1.0-py3.10-macosx-10.9-universal2.egg/charset_normalizer-3.1.0.dist-info' -> '/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/.eggs/charset_normalizer-3.1.0-py3.10-macosx-10.9-universal2.egg/EGG-INFO'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for googlemaps
ERROR: Could not build wheels for cairocffi, googlemaps, which is required to install pyproject.toml-based projects
subprocess.CalledProcessError: Command '/Users/kevinjayasusilo/alfamindv4/env/bin/python -m pip install --quiet --upgrade -e /Users/kevinjayasusilo/alfamindv4/apps/frappe ' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/commands/make.py", line 68, in init
    init(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/render.py", line 105, in wrapper_fn
    return fn(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/system.py", line 79, in init
    get_app(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/app.py", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/app.py", line 242, in install
    install_app(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/app.py", line 573, in install_app
    bench.run(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/bench.py", line 48, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bench/utils/__init__.py", line 158, in exec_cmd
    raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating alfamindv4
Do you want to rollback these changes? [y/N]: y```

## Additional information

OS version / distribution, `Frappe` install method, etc.
phot0n commented 1 year ago

seems those directories are not empty in your system required for installing cairocffi and googlemaps ..try clearing/deleting them?

/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/cairocffi_42e94acb8a6f4632b7db2beb82b739cb/.eggs/cffi-1.15.1-py3.10-macosx-10.9-universal2.egg/EGG-INFO

/private/var/folders/zj/gn4v9dh51371r70tgyxg13lm0000gn/T/pip-install-yofygykv/googlemaps_6706bee2103347e8a8c008370f1a2d13/.eggs/charset_normalizer-3.1.0-py3.10-macosx-10.9-universal2.egg/EGG-INFO

nikkothari22 commented 1 year ago

You can try this instead:

https://github.com/frappe/frappe/issues/20904#issuecomment-1535713241

hamzahabeeeeb commented 1 year ago

You can try this instead:

#20904 (comment)

i am working on a vps, this resolution doesnt work for me

hamzahabeeeeb commented 1 year ago

Could not build wheels for cairocffi, which is required to install pyproject.toml-based projects this is my error