IntelligenzaArtificiale / Free-Auto-GPT

Free Auto GPT with NO paids API is a repository that offers a simple version of Auto GPT, an autonomous AI agent capable of performing tasks independently. Unlike other versions, our implementation does not rely on any paid OpenAI API, making it accessible to anyone.
MIT License
2.49k stars 384 forks source link

Error when running code (jaxlib related) #96

Closed soyniik closed 1 year ago

soyniik commented 1 year ago

"Create a 100 word story Traceback (most recent call last): File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\jax_src\lib__init__.py", line 24, in import jaxlib as jaxlib ModuleNotFoundError: No module named 'jaxlib'

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

Traceback (most recent call last): File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\base_language.py", line 18, in _get_num_tokens_default_method from transformers import GPT2TokenizerFast File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers__init.py", line 26, in
from . import dependency_versions_check File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\dependency_versions_check.py", line 17, in from .utils.versions import require_version, require_version_core File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\utils__init.py", line 30, in from .generic import ( File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\utils\generic.py", line 33, in import jax.numpy as jnp File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\jax\init__.py", line 35, in from jax import config as _config_module File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\jax\config.py", line 17, in from jax._src.config import config # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\jax_src\config.py", line 24, in from jax._src import lib File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\jax_src\lib\
init__.py", line 26, in
raise ModuleNotFoundError( ModuleNotFoundError: jax requires jaxlib to be installed. See https://github.com/google/jax#installation for installation instructions.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\niik\Downloads\Free-AUTO-GPT-with-NO-API-main\AUTOGPT.py", line 230, in agent.run([input("Create a 100 word story")]) File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\experimental\autonomous_agents\autogpt\agent.py", line 91, in run assistant_reply = self.chain.run( ^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 239, in run
return self(kwargs, callbacks=callbacks)[self.output_keys[0]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 140, in call
raise e File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 134, in call
self._call(inputs, run_manager=run_manager) File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\llm.py", line 69, in _call
response = self.generate([inputs], run_manager=run_manager) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\llm.py", line 78, in generate
prompts, stop = self.prep_prompts(input_list, run_manager=run_manager) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\chains\llm.py", line 106, in prep_prompts prompt = self.prompt.format_prompt(selected_inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\prompts\chat.py", line 127, in format_prompt messages = self.format_messages(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\experimental\autonomous_agents\autogpt\prompt.py", line 46, in format_messages used_tokens = self.token_counter(base_prompt.content) + self.token_counter( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\base_language.py", line 56, in get_num_tokens return _get_num_tokens_default_method(text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\niik\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\base_language.py", line 20, in _get_num_tokens_default_method raise ValueError( ValueError: Could not import transformers python package. This is needed in order to calculate get_num_tokens. Please install it with pip install transformers. PS C:\Users\niik\Downloads\Free-AUTO-GPT-with-NO-API-main> "

i have tried many ways of downloading jaxlib without success

when installing transformers: C:\WINDOWS\system32>pip install transformers Requirement already satisfied: transformers in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (4.28.1) Requirement already satisfied: filelock in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (3.12.0) Requirement already satisfied: huggingface-hub<1.0,>=0.11.0 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (0.14.1) Requirement already satisfied: numpy>=1.17 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (1.23.5) Requirement already satisfied: packaging>=20.0 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (23.1) Requirement already satisfied: pyyaml>=5.1 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (6.0) Requirement already satisfied: regex!=2019.12.17 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (2023.5.5) Requirement already satisfied: requests in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (2.30.0) Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (0.13.3) Requirement already satisfied: tqdm>=4.27 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from transformers) (4.65.0) Requirement already satisfied: fsspec in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from huggingface-hub<1.0,>=0.11.0->transformers) (2023.4.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from huggingface-hub<1.0,>=0.11.0->transformers) (4.5.0) Requirement already satisfied: colorama in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (3.4) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (1.26.15) Requirement already satisfied: certifi>=2017.4.17 in c:\users\niik\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (2022.12.7) i'm running on windows 10, which might be the problem but haven't found a solution yet.

FlamingFury00 commented 1 year ago

Try the Docker container, probably will work there. I created that mainly for Windows users.

IntelligenzaArtificiale commented 1 year ago

@soyniik PLS FOLLOW THE OUR OFFICIAL GUIDE FOR INSTALLATION .

For example if you have problems installing transformers open an ISSUE on this repository : https://github.com/huggingface/transformers .