ChatDev icon indicating copy to clipboard operation
ChatDev copied to clipboard

No module named "tenacity"

Open mosobln opened this issue 3 years ago • 7 comments

Anyone facing the same issue when executing the idea and project name? I installed Conda env all requirements are satisfied.

File "C:\ChatDev\run.py", line 19, in from camel.typing import ModelType File "C:\ChatDev\camel_init_.py", line 14, in import camel.agents File "C:\ChatDev\camel\agents_init_.py", line 15, in from .chat_agent import ChatAgent File "C:\ChatDev\camel\agents\chat_agent.py", line 17, in from tenacity import retry ModuleNotFoundError: No module named 'tenacity'

mosobln avatar Sep 08 '23 23:09 mosobln

pip install tenacity

hemangjoshi37a avatar Sep 09 '23 08:09 hemangjoshi37a

Sorry forgot to mention that all packages are installed 🙃

mosobln avatar Sep 09 '23 09:09 mosobln

` (ChatDev_conda_env) E:\git\ChatDev>pip install tenacity Collecting tenacity Obtaining dependency information for tenacity from https://files.pythonhosted.org/packages/f4/f1/990741d5bb2487d529d20a433210ffa136a367751e454214013b441c4575/tenacity-8.2. 3-py3-none-any.whl.metadata Downloading tenacity-8.2.3-py3-none-any.whl.metadata (1.0 kB) Downloading tenacity-8.2.3-py3-none-any.whl (24 kB) Installing collected packages: tenacity Successfully installed tenacity-8.2.3

(ChatDev_conda_env) E:\git\ChatDev>python3 run.py --task "[description_of_your_idea]" --name "[project_name]" Traceback (most recent call last): File "E:\git\ChatDev\run.py", line 19, in
from camel.typing import ModelType
File "E:\git\ChatDev\camel_init_.py", line 14, in
import camel.agents
File "E:\git\ChatDev\camel\agents_init_.py", line 15, in
from .chat_agent import ChatAgent
File "E:\git\ChatDev\camel\agents\chat_agent.py", line 17, in from tenacity import retry
ModuleNotFoundError: No module named 'tenacity'

(ChatDev_conda_env) E:\git\ChatDev> `

TashaSkyUp avatar Sep 10 '23 20:09 TashaSkyUp

Oh I know what it is... On windows sometimes you can end up with a "python3.exe" somewhere else on your system. But when You make a venv (apparent even in conda) you get a python.exe. the same is not true in linux. so linux devs will forget to remove the 3 for the run command. so use

python run.py --task "[description_of_your_idea]" --name "[project_name]"

NOT

python3 run.py --task "[description_of_your_idea]" --name "[project_name]"

at least on windows

TashaSkyUp avatar Sep 10 '23 20:09 TashaSkyUp

Oh I know what it is... On windows sometimes you can end up with a "python3.exe" somewhere else on your system. But when You make a venv (apparent even in conda) you get a python.exe. the same is not true in linux. so linux devs will forget to remove the 3 for the run command. so use

python run.py --task "[description_of_your_idea]" --name "[project_name]"

NOT

python3 run.py --task "[description_of_your_idea]" --name "[project_name]"

at least on windows

@TashaSkyUp

In fact you should always run every command with python3 instead python every time in your life. That is a good practice I think. More specifically I run everything with python3.11 until mojo comes along or python3.12 release.

hemangjoshi37a avatar Sep 10 '23 22:09 hemangjoshi37a

@hemangjoshi37a "python3.exe" does not exist in the conda environment when you create the conda environment in windows.

(ChatDev_conda_env) E:\git\ChatDev\WareHouse\caption me_DefaultOrganization_20230910183821>where python3
C:\Users\Tasha\AppData\Local\Microsoft\WindowsApps\python3.exe

(ChatDev_conda_env) E:\git\ChatDev\WareHouse\caption me_DefaultOrganization_20230910183821>where python
C:\Users\Tasha\.conda\envs\ChatDev_conda_env\python.exe
C:\Python310\python.exe
C:\Users\Tasha\AppData\Local\Microsoft\WindowsApps\python.exe

So in fact for windows you get the error I mentioned and detailed above.

TashaSkyUp avatar Sep 11 '23 00:09 TashaSkyUp

@mosobln were you able to resolve this?

paulie-rodriguez avatar Oct 16 '23 02:10 paulie-rodriguez