theskumar/python-dotenv

Issue installing tree-of-thoughts due to dotenv dependency failing to build

arthur-brainchain opened this issue · 1 comments

so when I run pip install tree-of-thoughts

I get this:

  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
  ╰─> [73 lines of output]
      /Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [17 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/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/setuptools/__init__.py", line 2, in <module>
                from setuptools.extension import Extension, Library
              File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/setuptools/extension.py", line 5, in <module>
                from setuptools.dist import _get_unpatched
              File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/setuptools/dist.py", line 7, in <module>
                from setuptools.command.install import install
              File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/setuptools/command/__init__.py", line 8, in <module>
                from setuptools.command import install_scripts
              File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/setuptools/command/install_scripts.py", line 3, in <module>
                from pkg_resources import Distribution, PathMetadata, ensure_directory
              File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-bzxxe5bq/distribute_b2cb4b799bac49bfad168dcb7ba2863e/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 "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/Users/arthur/miniconda3/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/arthur/miniconda3/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/tmpe1yxzm80', '--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/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-install-zbb_ht3j/dotenv_41955e6fe7ea456b8a784a2d547e63eb/setup.py", line 13, in <module>
          setup(name='dotenv',
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 815, in resolve
          dist = self._resolve_dist(
                 ^^^^^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 851, in _resolve_dist
          dist = best[req.key] = env.best_match(
                                 ^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1123, in best_match
          return self.obtain(req, installer)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1135, in obtain
          return installer(requirement)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
          return fetch_build_egg(self, req)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/arthur/miniconda3/lib/python3.11/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/Users/arthur/miniconda3/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/tmpe1yxzm80', '--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.```

I created an issue on that repo (https://github.com/kyegomez/tree-of-thoughts/issues/44)  but since this specific dependency failed, 
bbc2 commented

Hi, this is an issue with another package called "dotenv". Also, tree-of-thoughts seems to have removed its dependency on that package very recently (https://github.com/kyegomez/tree-of-thoughts/releases/tag/e22). Could you try and see if that fixes your issue?

By the way, this is a common confusion, which is why we have #448.