mckaywrigley / repo-chat

Use AI to ask questions about any GitHub repo.
MIT License
601 stars 110 forks source link

Problems running `pip install -r requirements.txt` #14

Open liby opened 1 year ago

liby commented 1 year ago
❯ pip install -r requirements.txt
Requirement already satisfied: langchain==0.0.149 in /usr/local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (0.0.149)
Collecting python-dotenv==1.0.0 (from -r requirements.txt (line 2))
  Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Requirement already satisfied: supabase==1.0.3 in /usr/local/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (1.0.3)
Requirement already satisfied: tiktoken==0.3.3 in /usr/local/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (0.3.3)
Requirement already satisfied: openai in /usr/local/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (0.27.0)
Collecting dotenv (from -r requirements.txt (line 6))
  Using cached dotenv-0.0.5.tar.gz (2.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      /usr/local/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [16 lines of output]
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 14, in <module>
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/setuptools/__init__.py", line 2, in <module>
                from setuptools.extension import Extension, Library
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/setuptools/extension.py", line 5, in <module>
                from setuptools.dist import _get_unpatched
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/setuptools/dist.py", line 7, in <module>
                from setuptools.command.install import install
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/setuptools/command/__init__.py", line 8, in <module>
                from setuptools.command import install_scripts
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/setuptools/command/install_scripts.py", line 3, in <module>
                from pkg_resources import Distribution, PathMetadata, ensure_directory
              File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-wheel-etwrshtr/distribute_82f274f11c334d4fb1cd4aed238c1379/pkg_resources.py", line 1518, in <module>
                register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
            AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      × Encountered error while generating package metadata.
      ╰─> See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 97, in _fetch_build_egg_no_warn
          subprocess.check_call(cmd)
        File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/tmpmz8py12a', '--quiet', 'distribute']' returned non-zero exit status 1.

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

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/pip-install-t139p9hl/dotenv_cb8a09aa305d402d87c07d592b603072/setup.py", line 13, in <module>
          setup(name='dotenv',
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          _install_setup_requires(attrs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 85, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 894, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 39, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
          dist = self._resolve_dist(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
          return self.obtain(req, installer)
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
          return installer(requirement)
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 99, in _fetch_build_egg_no_warn
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/vz/gbv3wbr10qncf551j0ytwq_40000gn/T/tmpmz8py12a', '--quiet', 'distribute']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
kennydeezy commented 1 year ago

I have the exact error

kennydeezy commented 1 year ago

update: I simply deleted "dotenv" from requirements.txt and was able to proceed

MikeyBeez commented 6 months ago

This usually means you are using the wrong version of python. Usually it's too new.