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

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

Open
kk1775 opened this issue Apr 22, 2018 · 9 comments
Open

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

kk1775 opened this issue Apr 22, 2018 · 9 comments

Comments

@kk1775
Copy link

kk1775 commented Apr 22, 2018

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
Copy link
Contributor

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
Copy link
Author

kk1775 commented Apr 22, 2018

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
Copy link
Contributor

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
Copy link

hey whats the work around on windows by any chance?

@aak2003
Copy link

aak2003 commented Dec 2, 2018 via email

@aak2003
Copy link

aak2003 commented Dec 2, 2018 via email

@aak2003
Copy link

aak2003 commented Dec 2, 2018 via email

@PoojaAmin29
Copy link

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
Copy link
Contributor

@PoojaAmin29 - Can you share the stack trace?

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

5 participants