the-ethan-hunt / B.E.N.J.I.

B.E.N.J.I.- The Impossible Missions Force's digital assistant
MIT License
91 stars 94 forks source link

Unable to run on Linux #37

Closed CaptainDaVinci closed 6 years ago

CaptainDaVinci commented 6 years ago

I have tried installing the dependencies from ./linux/requirements-linux.txt however I am facing problems with certain modules. pyttsx gives an import error in python3, for python3 pyttxs3 is required.

the-ethan-hunt commented 6 years ago

@kb-studios , please take a look at this issue

kaushal-py commented 6 years ago

For me, pyttsx worked in Linux. But while testing it out on windows I had to go for pyttsx3. Ok then its better that we go with pyttsx3. For the windows version I did import pyttsx3 as pyttsx This fix worked, as I didn't have to re-factor the rest of the code.

kaushal-py commented 6 years ago
import wx
import re
import os
import wikipedia
import time 
import webbrowser 
import json
import requests
import ctypes 
import random
import urllib
import ssl
from bs4 import BeautifulSoup
import speech_recognition as sr
import requests

# Import urllib (according to the version the OS supports)
try:
    from urllib import urlopen
except:
    try:
        from urllib.request import urlopen
    except:
        print("urllib is not installed")

# Import pyttsx (according to the version the OS supports)
try:
    import pyttsx
except:
    try:
        import pyttsx3 as pyttsx
    except:
        print("Pyttsx not installed")

For now, am doing the imports this way. So as to avoid any sorts of errors while configuring the dependencies.