crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

install error

Open DonFelidae opened this issue 2 years ago • 8 comments

hi! i am noob on this, i install crewai and after set openai key tried to run crew_test.py but give me this error:

/AppData/Local/Programs/Python/Python312/python.exe c:/Users/cGz/Desktop/crewAI/tests/crew_test.pyesktop\crewAI> Traceback (most recent call last): File "c:\Users\cGz\Desktop\crewAI\tests\crew_test.py", line 10, in from crewai.agent import Agent ModuleNotFoundError: No module named 'crewai'

somebody with same issue?

DonFelidae avatar Jan 22 '24 01:01 DonFelidae

Try to do pip install crewai, i think you didn't install it.

siddartha-10 avatar Jan 22 '24 01:01 siddartha-10

i get this:

C:\Users\cGz\Desktop\crewAI> pip install crewai
Requirement already satisfied: crewai in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (0.1.32) Requirement already satisfied: langchain-openai<0.0.3,>=0.0.2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from crewai) (0.0.2.post1) Requirement already satisfied: pydantic<3.0.0,>=2.4.2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from crewai) (2.5.3) Requirement already satisfied: langchain<0.2.0,>=0.1.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from crewai) (0.1.0) Requirement already satisfied: openai<2.0.0,>=1.7.1 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from crewai) (1.7.1) Requirement already satisfied: numpy<2,>=1 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (1.26.3) Requirement already satisfied: langchain-community<0.1,>=0.0.9 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (0.0.11) Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (8.2.3) Requirement already satisfied: SQLAlchemy<3,>=1.4 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (2.0.25) Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (0.6.3) Requirement already satisfied: langchain-core<0.2,>=0.1.7 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (0.1.9) Requirement already satisfied: langsmith<0.1.0,>=0.0.77 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (0.0.79) Requirement already satisfied: requests<3,>=2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (2.31.0) Requirement already satisfied: PyYAML>=5.3 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (6.0.1) Requirement already satisfied: jsonpatch<2.0,>=1.33 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (1.33) Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (4.0.3) Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain<0.2.0,>=0.1.0->crewai) (3.9.1) Requirement already satisfied: tiktoken<0.6.0,>=0.5.2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain-openai<0.0.3,>=0.0.2->crewai) (0.5.2) Requirement already satisfied: typing-extensions<5,>=4.7 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (4.9.0) Requirement already satisfied: distro<2,>=1.7.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (1.9.0) Requirement already satisfied: sniffio in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (1.3.0) Requirement already satisfied: tqdm>4 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (4.66.1) Requirement already satisfied: httpx<1,>=0.23.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (0.26.0) Requirement already satisfied: anyio<5,>=3.5.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from openai<2.0.0,>=1.7.1->crewai) (3.7.1) Requirement already satisfied: annotated-types>=0.4.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from pydantic<3.0.0,>=2.4.2->crewai) (0.6.0) Collecting pydantic-core==2.14.6 Using cached pydantic_core-2.14.6-cp310-none-win_amd64.whl (1.9 MB) Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.0->crewai) (1.9.4) Requirement already satisfied: attrs>=17.3.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.0->crewai) (23.2.0) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.0->crewai) (1.4.1) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.0->crewai) (6.0.4) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.0->crewai) (1.3.1) Requirement already satisfied: exceptiongroup in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from anyio<5,>=3.5.0->openai<2.0.0,>=1.7.1->crewai) (1.2.0) Requirement already satisfied: idna>=2.8 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from anyio<5,>=3.5.0->openai<2.0.0,>=1.7.1->crewai) (3.6) Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain<0.2.0,>=0.1.0->crewai) (3.20.1) Requirement already satisfied: typing-inspect<1,>=0.4.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain<0.2.0,>=0.1.0->crewai) (0.9.0) Requirement already satisfied: certifi in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.7.1->crewai) (2023.11.17) Requirement already satisfied: httpcore==1.* in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.7.1->crewai) (1.0.2) Requirement already satisfied: h11<0.15,>=0.13 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<2.0.0,>=1.7.1->crewai) (0.14.0) Requirement already satisfied: jsonpointer>=1.9 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from jsonpatch<2.0,>=1.33->langchain<0.2.0,>=0.1.0->crewai) (2.4) Requirement already satisfied: packaging<24.0,>=23.2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from langchain-core<0.2,>=0.1.7->langchain<0.2.0,>=0.1.0->crewai) (23.2) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from requests<3,>=2->langchain<0.2.0,>=0.1.0->crewai) (1.26.18) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from requests<3,>=2->langchain<0.2.0,>=0.1.0->crewai) (3.3.2) Requirement already satisfied: greenlet!=0.4.17 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from SQLAlchemy<3,>=1.4->langchain<0.2.0,>=0.1.0->crewai) (3.0.3) Requirement already satisfied: regex>=2022.1.18 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from tiktoken<0.6.0,>=0.5.2->langchain-openai<0.0.3,>=0.0.2->crewai) (2023.12.25) Requirement already satisfied: colorama in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from tqdm>4->openai<2.0.0,>=1.7.1->crewai) (0.4.5) Requirement already satisfied: mypy-extensions>=0.3.0 in c:\users\cgz\appdata\local\programs\python\python310\lib\site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain<0.2.0,>=0.1.0->crewai) (1.0.0) Installing collected packages: pydantic-core Attempting uninstall: pydantic-core Found existing installation: pydantic_core 2.16.1 Uninstalling pydantic_core-2.16.1: Successfully uninstalled pydantic_core-2.16.1 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. llmware 0.1.14 requires openai==0.27.7, but you have openai 1.7.1 which is incompatible. Successfully installed pydantic-core-2.14.6

[notice] A new release of pip available: 22.2.1 -> 23.3.2 [notice] To update, run: python.exe -m pip install --upgrade pip

i must re install all whit the exact (estable for run crewai) version of each one of the dependencies?, because i upgrade the python version to the last one....

pd: y delete the last folcder and reinstall git clone, then i post this output

DonFelidae avatar Jan 22 '24 02:01 DonFelidae

How are you running the script? if you do pip freeze do you get crewai in the list?

joaomdmoura avatar Jan 22 '24 02:01 joaomdmoura

i use this line for run:

C:/Users/cGz/AppData/Local/Programs/Python/Python312/python.exe c:/Users/cGz/Desktop/crewAI/src/crewai/crew.py

and pip freeze show me the crewai, look:

C:\Users\cGz\Desktop\crewAI> pip freeze ai21==1.0.3 aiohttp==3.9.1 aiosignal==1.3.1 annotated-types==0.6.0 anthropic==0.3.11 anyio==3.7.1 appdirs==1.4.4 arxiv==2.1.0 asttokens==2.0.8 async-timeout==4.0.3 attrs==23.2.0 autogenstudio==0.0.25a0 backcall==0.2.0 backoff==2.2.1 beautifulsoup4==4.11.1 boto3==1.24.53 botocore==1.27.96 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 cohere==4.1.3 colorama==0.4.5 crewai==0.1.32 curl-cffi==0.5.10 dataclasses-json==0.6.3 datasets==2.15.0 debugpy==1.6.3 decorator==5.1.1 dill==0.3.7 diskcache==5.6.3 distlib==0.3.8 distro==1.9.0 dnspython==2.4.2 docker==7.0.0 duckduckgo_search==4.1.1 entrypoints==0.4 environs==9.5.0 exceptiongroup==1.2.0 executing==1.0.0 faiss-cpu==1.7.4 fastapi==0.109.0 feedparser==6.0.10 filelock==3.13.1 FLAML==2.1.1 frozendict==2.4.0 frozenlist==1.4.1 fsspec==2023.10.0 greenlet==3.0.3 grpcio==1.56.0 h11==0.14.0 html5lib==1.1 httpcore==1.0.2 httpx==0.26.0 huggingface-hub==0.19.4 idna==3.6 iniconfig==2.0.0 ipykernel==6.15.2 ipython==8.4.0 jedi==0.18.1 Jinja2==3.1.2 jmespath==1.0.1 joblib==1.3.2 jsonpatch==1.33 jsonpointer==2.4 jupyter-core==4.11.1 jupyter_client==7.3.5 langchain==0.1.0 langchain-community==0.0.11 langchain-core==0.1.9 langchain-openai==0.0.2.post1 langsmith==0.0.79 llmware==0.1.14 lxml==4.9.3 MarkupSafe==2.1.3 marshmallow==3.20.1 matplotlib-inline==0.1.6 mpmath==1.3.0 multidict==6.0.4 multiprocess==0.70.15 multitasking==0.0.11 mypy-extensions==1.0.0 nest-asyncio==1.5.5 networkx==3.2.1 nltk==3.8.1 numpy==1.26.3 openai==1.7.1 packaging==23.2 pandas==2.1.4 parso==0.8.3 pdf2image==1.16.0 pickleshare==0.7.5 pillow==10.2.0 platformdirs==4.1.0 pluggy==1.3.0 prompt-toolkit==3.0.31 protobuf==4.25.1 psutil==5.9.1 pure-eval==0.2.2 py==1.11.0 pyarrow==14.0.2 pyarrow-hotfix==0.6 pyautogen==0.2.6 pycparser==2.21 pydantic==2.5.3 pydantic_core==2.14.6 Pygments==2.13.0 pylance==0.9.8 pymilvus==2.3.0 pymongo==4.5.0 pyparsing==3.0.9 pytesseract==0.3.10 pytest==7.4.4 python-dateutil==2.8.2 python-dotenv==1.0.0 pytz==2023.3.post1 pywin32==304 PyYAML==6.0.1 pyzmq==23.2.1 regex==2023.12.25 requests==2.31.0 s3transfer==0.6.2 safetensors==0.4.1 scikit-learn==1.3.2 scipy==1.11.4 sentence-transformers==2.2.2 sentencepiece==0.1.99 sgmllib3k==1.0.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.5 SQLAlchemy==2.0.25 stack-data==0.5.0 starlette==0.35.1 superagent==0.0.0 sympy==1.12 tabulate==0.9.0 tenacity==8.2.3 termcolor==2.4.0 threadpoolctl==3.2.0 tiktoken==0.5.2 tokenizers==0.15.0 tomli==2.0.1 torch==2.1.2 torchvision==0.16.2 tornado==6.2 tqdm==4.66.1 traitlets==5.3.0 transformers==4.35.2 typer==0.9.0 typing-inspect==0.9.0 typing_extensions==4.9.0 tzdata==2023.4 ujson==5.9.0 urllib3==1.26.18 uvicorn==0.25.0 virtualenv==20.25.0 wcwidth==0.2.5 webencodings==0.5.1 Werkzeug==3.0.1 Wikipedia-API==0.6.0 word2number==1.1 xxhash==3.4.1 yarl==1.9.4 yfinance==0.2.28

Update: i change the interpreter from 3.12 to 3.10 and all error disapear, now i am see how this work to create solutions, thanks siddartha-10 and joaomdmoura for your time and help.

DonFelidae avatar Jan 22 '24 03:01 DonFelidae

I'm on 3.10, and can see see crewai when in pipfreeze, yet it still cant find the module. Any idea? @joaomdmoura

michaelcutajar1995 avatar Jul 16 '24 14:07 michaelcutajar1995

I am not sure what is going on with the installation of the crewai from https://docs.crewai.com/installation. I did setup python version 3.10.15, and was going exactly by provided instructions, and I am getting the error: ModuleNotFoundError: No module named 'tomllib'! In my understanding, it is something I am not supposed to see, as tomllib was introduced in python 3.11, wasn't it? I did try the installation recipes in VS code, running on 20.04 Ubuntu. The question to the crewAI developers - why it is happening, and how to overcome this problem?

ulrmehdi avatar Oct 22 '24 17:10 ulrmehdi

I am also running into a similar problem with tomllib. I am running Python 3.10.12, after I did the install for crewAI I ran the command pip freeze | grep crewai and received this as output:

crewai==0.76.2
crewai-tools==0.13.2

When I tried to create my own project I kept getting the error we have mentioned above, ModuleNotFoundError: No module named 'tomllib'. Any resolution?

kitanat avatar Oct 25 '24 21:10 kitanat

@DonFelidae Using python3.10 fixed it for me.

Never mind - I see your "Update" at the end of the issue comment. You got it 🙂

tdiprima avatar Aug 04 '25 16:08 tdiprima