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

Poetry install fail to install ffmpy consistently #1378

Open
shahrul1509 opened this issue Dec 7, 2023 · 4 comments
Open

Poetry install fail to install ffmpy consistently #1378

shahrul1509 opened this issue Dec 7, 2023 · 4 comments
Labels

Comments

@shahrul1509
Copy link

Greetings everyone,
I'm facing a problem when running the poetry install --with ui,local of the steps. It keeps on failing when it is trying to install ffmpy. My apologies if the issue is a redundant one but I've searched around in the forum but couldn't find any similar issue. There's no issue installing ffmpy outside of python env and I've tried to manually install ffmpy via pip install ffmpy but still gives the same error so I suspect my python env is the problem? My env is:

OS: Ubuntu 22.04
Kernel: 5.15.0-76-generic
Python: 3.11

Below is the detail error message:

poetry install --with ui,local
Installing dependencies from lock file

Package operations: 4 installs, 2 updates, 2 removals

  • Removing importlib-metadata (6.11.0)
  • Removing zipp (3.17.0)
  • Updating jsonschema (4.17.3 -> 4.20.0)
  • Updating platformdirs (3.11.0 -> 4.1.0)
  • Installing ffmpy (0.3.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  Traceback (most recent call last):
    File "/home/p23sl03mohdshah/privateGPT/.venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/p23sl03mohdshah/privateGPT/.venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/p23sl03mohdshah/privateGPT/.venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in build_wheel
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 6, in <module>
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 172, in setup
      ok = dist.parse_command_line()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line
      args = self._parse_command_opts(parser, args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 863, in _parse_command_opts
      nargs = _Distribution._parse_command_opts(self, parser, args)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 534, in _parse_command_opts
      cmd_class = self.get_command_class(command)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 710, in get_command_class
      self.cmdclass[command] = cmdclass = ep.load()
                                          ^^^^^^^^^
    File "/home/p23sl03mohdshah/.pyenv/versions/3.11.7/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
      module = import_module(match.group('module'))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/p23sl03mohdshah/.pyenv/versions/3.11.7/lib/python3.11/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 940, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 27, in <module>
      from .macosx_libfile import calculate_macosx_platform_tag
    File "/tmp/tmpkxvq19te/.venv/lib/python3.11/site-packages/wheel/macosx_libfile.py", line 43, in <module>
      import ctypes
    File "/home/p23sl03mohdshah/.pyenv/versions/3.11.7/lib/python3.11/ctypes/__init__.py", line 8, in <module>
      from _ctypes import Union, Structure, Array
  ModuleNotFoundError: No module named '_ctypes'
  

  at .venv/lib/python3.11/site-packages/poetry/installation/chef.py:147 in _prepare
      143│ 
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│ 
      146│             if error is not None:
    → 147│                 raise error from None
      148│ 
      149│             return path
      150│ 
      151│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with ffmpy (0.3.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "ffmpy (==0.3.1)"'.
@nickzherdev
Copy link

Same here.
Try installing libffi-dev and reinstalling python3.11 as mentioned here:
https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul

I did that and poetry installed all what was needed:
....
• Removing importlib-metadata (6.8.0)
• Removing zipp (3.17.0)
• Installing ffmpy (0.3.1)
• Installing gradio (4.4.1)
• Installing sentence-transformers (2.2.2)

Installing the current project: private-gpt (0.1.0)
Not sure though why is it 0.1.0 and not 0.2.0

Copy link
Contributor

github-actions bot commented Jan 2, 2024

Stale issue

@github-actions github-actions bot added the stale label Jan 2, 2024
@saedkakei
Copy link

saedkakei commented Mar 2, 2024

Poetry instalation issue with Miniconda on Windows 11 Hello, once you set to run "poetry install --with ui,local", you'll get this message: [[Poetry could not find a pyproject.toml file in C:\Users\ASUS\Downloads\privateGPT or its parents]]

So, you need to run this command that I've bolding it for you:

C:\Users\ASUS\Downloads\privateGPT> pip wheel --use-pep517 "pypika (==0.48.9)"
Collecting pypika==0.48.9
Using cached PyPika-0.48.9-py2.py3-none-any.whl

After that, re-run "poetry install --with ui,local" and you will be able to continue with your installation of privateGPT.

@muzhi1991
Copy link

try this:

pip install -U build==0.10.0
pip install -U ffmpy==0.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants