Closed arthur-brainchain closed 1 year ago
Hey please try again! Should work now!
Same error:
Requirement already satisfied: transformers in /Users/arthur/miniconda3/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (4.30.0.dev0)
Requirement already satisfied: openai in /Users/arthur/miniconda3/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (0.27.6)
Requirement already satisfied: guidance in /Users/arthur/miniconda3/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (0.0.43)
Collecting dotenv
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-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/private/var/folders/_j/gj9symrn0rb44g0xq2m8xvg40000gn/T/pip-wheel-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/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-zl0pnj7e/distribute_458a3ca987864fe5988326e7fe78c6d5/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/tmpk5_2mhm9', '--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-0_f4x5w2/dotenv_fc78a45d2976462cb8e66dfe7790e233/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/tmpk5_2mhm9', '--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.```
With new code, after trying to run the example after running python setup.py install
I still get this error:
2023-05-29 20:03:52,494 - INFO - Note: NumExpr detected 12 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
2023-05-29 20:03:52,494 - INFO - NumExpr defaulting to 8 threads.
Using api_model gpt-3.5-turbo
2023-05-29 20:03:53,429 - INFO - Saving the current tree and metrics.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/arthur/AI/Autonomy/tree-of-thoughts/example.py:29 in <module> │
│ │
│ 26 │
│ 27 #call the solve emthod with the input problem and other params │
│ 28 │
│ ❱ 29 solution = tree_of_thoughts.solve(input_problem, │
│ 30 │ num_thoughts=num_thoughts, │
│ 31 │ max_steps=max_states, │
│ 32 │ max_states=5, │
│ │
│ /Users/arthur/AI/Autonomy/tree-of-thoughts/tree_of_thoughts/treeofthoughts.py:40 in solve │
│ │
│ 37 │ │ try: │
│ 38 │ │ │ best_thoughts = "" │
│ 39 │ │ │ if self.search_algorithm == 'BFS': │
│ ❱ 40 │ │ │ │ result = self.tot_bfs(initial_prompt, num_thoughts, max_steps, max_state │
│ 41 │ │ │ │ if result: │
│ 42 │ │ │ │ │ self.save_tree_to_json(self.file_name) │
│ 43 │ │ │ │ │ best_thoughts = result │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: TreeofThoughts.tot_bfs() takes 6 positional arguments but 7 were given```
yes, this has been fixed now please excuse us!
Can you try again and let me know if it works!
Trying to build this on a macOS with latest OS: MacBook Pro with M2 Max, 64GB RAM