jonathanferreiras / whats-bot

Chatbot para WhatsApp
MIT License
49 stars 34 forks source link

Installation fails due to conflicting pyyaml version #5

Open NeolithEra opened 5 years ago

NeolithEra commented 5 years ago

Hi, users are unable to run whats-bot due to dependency conflict with pyyaml package. As shown in the following full dependency graph of whats-bot, whats-bot requires pyyaml>=4.2b1,while chatterbot-corpus==1.1.4 requires PyYAML>=3.12,<4.0.

According to pip’s “first found wins” installation strategy, pyyaml 5.1.2 is the actually installed version. However, pyyaml 5.1.2 does not satisfy PyYAML>=3.12,<4.0.

Dependency tree

whats-bot-master
| +-certifi(version range:==2018.10.15)
| +-chardet(version range:==3.0.4)
| +-chatterbot(version range:==0.8.7)
| +-chatterbot-corpus(version range:==1.1.4)
| | +-pyyaml(version range:>=3.12,<4.0)
| +-future(version range:==0.17.1)
| +-idna(version range:==2.7)
| +-mathparse(version range:==0.1.2)
| +-nltk(version range:==3.3)
| +-oauthlib(version range:==2.1.0)
| +-pymongo(version range:==3.7.2)
| +-python-dateutil(version range:==2.6.1)
| | +-six(version range:*)
| | +-six(version range:>=1.5)
| +-python-twitter(version range:==3.5)
| | +-future(version range:*)
| | +-requests(version range:*)
| | | +-certifi(version range:>=2017.4.17)
| | | +-chardet(version range:<3.1.0,>=3.0.2)
| | | +-idna(version range:>=2.5,<2.8)
| | | +-urllib3(version range:>=1.21.1,<1.25)
| | +-requests-oauthlib(version range:*)
| +-pyyaml(version range:>=4.2b1)
| +-requests(version range:==2.20.1)
| | +-certifi(version range:>=2017.4.17)
| | +-chardet(version range:<3.1.0,>=3.0.2)
| | +-idna(version range:>=2.5,<2.8)
| | +-urllib3(version range:>=1.21.1,<1.25)
| +-requests-oauthlib(version range:==1.0.0)
| +-selenium(version range:==3.141.0)
| +-six(version range:==1.11.0)
| +-sqlalchemy(version range:==1.2.14)
| +-urllib3(version range:==1.24.2)

Solution

Thanks for your help. Best, Neolith

NeolithEra commented 5 years ago

Solution

  1. Fix your direct dependency to be PyYAML>=3.12,<4.0. I have checked this revision will not affect your downstream projects now.
  2. Ask your upstream project chatterbot-corpus for help to loose the version range of PyYAML.

Which solution do you prefer, 1 or 2? @jonathanferreiras Please let me know your choice. I can submit a PR to solve this issue.

jonathanferreiras commented 5 years ago

Hello @NeolithEra ! Thank you for your help!

May be choice 1!

david3climas commented 4 years ago

Olá, estou com uma tremenda dificuldade em resolver esse erro. mport os import time import re import requests import sys import json

from selenium import webdriver from chatterbot.trainers import ListTrainer from chatterbot import ChatBot

class wppbot:

setamos o caminho de nossa aplicação

    dir_path = os.getcwd()
    print(self.dir_path)
#o costrutor vai ter o nome do noss bot
    def __init__(self, nome_bot):
#setamos o bot e a forma com que ele vai treinar
    self.bot = ChatBot(nome_bot)
    self.bot.set_trainer(ListTrainer)
#Setamos onde está nosso chromedriver

++++++++++++++++++++++++++++++++++++++++

saída é:

E:\bot\botpython>python bot.py File "bot.py", line 21 self.bot = ChatBot(nome_bot) ^ IndentationError: expected an indented block