thevickypedia / Jarvis

Fully Functional Voice Based Natural Language UI
https://jarvis-health.vigneshrao.com
MIT License
209 stars 41 forks source link

Python request module errors #3

Closed salimdason closed 3 years ago

salimdason commented 3 years ago

Running the command python3 jarvis.py on my windows 10 computer throws back the following error:

Traceback (most recent call last): File "C:\Users\dason\Desktop\Jarvis\Jarvis-master\jarvis.py", line 18, in import certifi and the other modules. i.e

import holidays import pytemperature import pyttsx3 as audio import requests import speech_recognition as sr import yaml

I have installed all the necessary requirements.

Any idea on how I can get around this error will be appreciated.

thevickypedia commented 3 years ago

@salimdason - I'd suspect env variables to be the culprit, make sure you add the location (where you installed your modules) to the PATH env variable.

However I'd suggest using an IDE (like PyCharm), if you are already using an IDE setup a venv and make your life easy. I'd start with installing PyCharm's community edition, setup a virtual environment and then run the bash install_windows.sh so the requirements gets installed into venv and then the python3 jarvis.py should work fine.

I'm running on a mac but it should be the same for Windows. Comment back if it doesn't, I will take a look.

Screen Shot 2020-12-27 at 12 03 08 PM

thevickypedia commented 3 years ago

@salimdason I just realized your issue when I ran into the same. The issue is not with the modules, it is with your env where you install. To do a clean slate install follow the below commands:

python3 -m venv jarvis_venv  # this will create a virtual env named jarvis_venv

source jarvis_venv/bin/activate  # activate your virtual env

which python  # check if python is now pointing to your virtual env

bash installs_windows.sh  # now start installing your requirements

In the sample below my initial run failed the same way as yours when I did not activate the venv so python uses the default env where none of the dependencies were installed. FYI - My virtual env name is venv

Sample: sample

salimdason commented 3 years ago

Thank you. That's super helful

Get Outlook for Androidhttps://aka.ms/ghei36


From: Vignesh notifications@github.com Sent: Tuesday, January 12, 2021 1:17:31 AM To: thevickypedia/Jarvis Jarvis@noreply.github.com Cc: salimdason dasonsalim@outlook.com; Mention mention@noreply.github.com Subject: Re: [thevickypedia/Jarvis] Python request module errors (#3)

@salimdasonhttps://github.com/salimdason I just realized your issue when I ran into the same. The issue is not with the modules, it is with your env where you install. To do a clean slate install follow the below commands:

python3 -m venv jarvis_venv # this will create a virtual env named jarvis_venv

source jarvis_venv/bin/activate # activate your virtual env

which python # check if python is now pointing to your virtual env

bash installs_windows.sh # now start installing your requirements

In the sample below my initial run failed the same way as yours when I did not activate the venv so python uses the default env where none of the dependencies were installed. FYI - My virtual env name is venv

Sample: [sample]https://user-images.githubusercontent.com/38729644/104252949-f168a180-5438-11eb-9391-d0102cfa5bc6.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/thevickypedia/Jarvis/issues/3#issuecomment-758306330, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARDSO5VDWS7IYVN76MFOWTTSZOIJXANCNFSM4VK67LYQ.