raghavpatnecha / smartmirror

Giving AI to the Smart Mirror.
MIT License
23 stars 7 forks source link

Running bot.py and it says no module named 'requests' #13

Open kk1775 opened 6 years ago

kk1775 commented 6 years ago

I follow the steps on hh and when I execute the bot.py and it said no module named 'requests' I run python bot.py and I get this: Traceback (most recent call last): File "bot.py", line 7, in import requests ModuleNotFoundError: No module named 'requests' What's the problem? I'm using Win10. Can someone please tell me how to solve this?

akshaybahadur21 commented 6 years ago

From a cmd prompt, use > Path\easy_install.exe requests, where Path is your Python*\Scripts folder, if it was installed. (For example: C:\Python32\Scripts\easy_install.exe)

If you don't have easy install and are running on a windows machine, you can get it here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#distribute

If you manually want to add a library to a windows machine, you can download the compressed library, uncompress it, and then place it into the Lib folder of your python path. (For example: C:\Python27\Lib)

kk1775 commented 6 years ago

Hi, I found it was the problem on the path of the different version of Python. Yet, I still can't run the bot.py sadly. It shows this: Error: Could not find or load main class Py4JServer Traceback (most recent call last): File "bot.py", line 12, in from nlg import NLG File "C:\Users\kk1775\Desktop\AI-Smart-Mirror-master\nlg.py", line 7, in gateway = launch_py4j_server() File "C:\Users\kk1775\Desktop\AI-Smart-Mirror-master\py4j_server__init__.py", line 34, in launch_py4j_server _port = int(_pid.stdout.readline()) ValueError: invalid literal for int() with base 10: ' ' What should I do? plz help I really apreciate.

akshaybahadur21 commented 6 years ago

This code doesnt work on windows. There is a workaround for that but that is not a part of this code. Kindly use Vbox for running it on ubuntu

iggytree commented 6 years ago

hey whats the work around on windows by any chance?

aak2003 commented 5 years ago

Try with virtual box

On Fri, Aug 17, 2018, 5:25 AM iggytree <notifications@github.com wrote:

hey whats the work around on windows by any chance?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/raghavpatnecha/smartmirror/issues/13#issuecomment-413718263, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae1M0dkO_9ZrOQinoKIsvx78p2xedm--ks5uRgZtgaJpZM4Te7br .

aak2003 commented 5 years ago

Try installing py4j for your system

On Mon, Apr 23, 2018, 12:25 AM kk1775 <notifications@github.com wrote:

Hi, I found it was the problem on the path of the different version of Python. Yet, I still can't run the bot.py sadly. It shows this: Error: Could not find or load main class Py4JServer Traceback (most recent call last): File "bot.py", line 12, in from nlg import NLG File "C:\Users\kk1775\Desktop\AI-Smart-Mirror-master\nlg.py", line 7, in gateway = launch_py4j_server() File "C:\Users\kk1775\Desktop\AI-Smart-Mirror-master\py4jserverinit_.py", line 34, in launch_py4j_server _port = int(_pid.stdout.readline()) ValueError: invalid literal for int() with base 10: ' ' What should I do? plz help I really apreciate.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/raghavpatnecha/smartmirror/issues/13#issuecomment-383403895, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae1M0UnYm7Skrct3oQA1j6trToTrB5mlks5trNIHgaJpZM4Te7br .

aak2003 commented 5 years ago

Sudo apt-get install requests , pip install requests.

On Sun, Apr 22, 2018, 10:37 PM kk1775 <notifications@github.com wrote:

I do as you said and I use both ways by the easy install and the manual steps to install the library requests. But it still shows the same error message. Is there another factor that causes this? BTW, what kind of OS did you run? Cause I would like to try this on raspberry pi 3 in the future. Thanks a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/raghavpatnecha/smartmirror/issues/13#issuecomment-383396628, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae1M0cswAxOs1qGtz38Htl31OgnNfpDAks5trLjDgaJpZM4Te7br .

PoojaAmin29 commented 4 years ago

I am also getting the same error and i am doing it in raspberry pi itself, i tried out these commands sudo apt-get install requests pip install requests. but it shows pip requests already installed but when i run python bot.py again it gives the same error

akshaybahadur21 commented 4 years ago

@PoojaAmin29 - Can you share the stack trace?