Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComfyUI-IF_AI_tools module for custom nodes: cannot import name 'Mistral' from 'mistralai' #118

Open
dancemanUK opened this issue Nov 10, 2024 · 4 comments

Comments

@dancemanUK
Copy link

File "G:\comfyUI+AnimateDiff\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools_init_.py", line 13, in
from .IFChatPromptNode import IFChatPrompt
File "G:\comfyUI+AnimateDiff\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools\IFChatPromptNode.py", line 19, in
from .send_request import send_request
File "G:\comfyUI+AnimateDiff\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools\send_request.py", line 19, in
from .mistral_api import send_mistral_request
File "G:\comfyUI+AnimateDiff\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools\mistral_api.py", line 8, in
from mistralai import Mistral
ImportError: cannot import name 'Mistral' from 'mistralai' (G:\comfyUI+AnimateDiff\python_embeded\lib\site-packages\mistralai_init_.py)

Cannot import G:\comfyUI+AnimateDiff\ComfyUI\custom_nodes\ComfyUI-IF_AI_tools module for custom nodes: cannot import name 'Mistral' from 'mistralai' (G:\comfyUI+AnimateDiff\python_embeded\lib\site-packages\mistralai_init_.py)

@dancemanUK
Copy link
Author

use you new requirements.txt.
......\python_embeded\python.exe -s -m pip install -r requirements.txt

anthropic
groq
mistralai
huggingface_hub
pypdf2
pdf2image
timm
sentence-transformers
byaldi
opencv-python
IPython
python-dotenv
nltk
tiktoken
matplotlib
plotly
kaleido
networkx
fastparquet
pydantic
rich
supervision
nano-graphrag
qwen-vl-utils

@dancemanUK
Copy link
Author

ComfyUI-IF_AI_tools>......\python_embeded\python.exe -s -m pip install mistralai
WARNING: Ignoring invalid distribution - (g:\comfyui+animatediff\python_embeded\lib\site-packages)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: mistralai in g:\comfyui+animatediff\python_embeded\lib\site-packages (0.1.8)
Requirement already satisfied: httpx<0.26.0,>=0.25.2 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from mistralai) (0.25.2)
Requirement already satisfied: orjson<4.0.0,>=3.9.10 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from mistralai) (3.9.15)
Requirement already satisfied: pydantic<3.0.0,>=2.5.2 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from mistralai) (2.8.2)
Requirement already satisfied: anyio in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpx<0.26.0,>=0.25.2->mistralai) (3.7.1)
Requirement already satisfied: certifi in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpx<0.26.0,>=0.25.2->mistralai) (2023.7.22)
Requirement already satisfied: httpcore==1.* in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpx<0.26.0,>=0.25.2->mistralai) (1.0.1)
Requirement already satisfied: idna in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpx<0.26.0,>=0.25.2->mistralai) (2.10)
Requirement already satisfied: sniffio in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpx<0.26.0,>=0.25.2->mistralai) (1.3.0)
Requirement already satisfied: h11<0.15,>=0.13 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from httpcore==1.*->httpx<0.26.0,>=0.25.2->mistralai) (0.14.0)
Requirement already satisfied: annotated-types>=0.4.0 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from pydantic<3.0.0,>=2.5.2->mistralai) (0.5.0)
Requirement already satisfied: pydantic-core==2.20.1 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from pydantic<3.0.0,>=2.5.2->mistralai) (2.20.1)
Requirement already satisfied: typing-extensions>=4.6.1 in g:\comfyui+animatediff\python_embeded\lib\site-packages (from pydantic<3.0.0,>=2.5.2->mistralai) (4.12.2)
Requirement already satisfied: exceptiongroup in g:\comfyui+animatediff\python_embeded\lib\site-packages (from anyio->httpx<0.26.0,>=0.25.2->mistralai) (1.1.3)
WARNING: Ignoring invalid distribution - (g:\comfyui+animatediff\python_embeded\lib\site-packages)
WARNING: Ignoring invalid distribution - (g:\comfyui+animatediff\python_embeded\lib\site-packages)

@if-ai
Copy link
Owner

if-ai commented Nov 10, 2024

try:
pip cache purge

to purge the packages temps

then upgrade pip:

python -m pip install --upgrade pip

pip uninstall mistralai

then install mistral again

pip install mistralai

@if-ai
Copy link
Owner

if-ai commented Nov 10, 2024

if you are in portable move to the ......\python_embeded\python.exe -s -m pip
add the previous pip comands to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants