Instapy: No module named requests.

Created on 25 Sep 2017  路  22Comments  路  Source: timgrossmann/InstaPy

Traceback (most recent call last):
File "quickstart.py", line 1, in
from instapy import InstaPy
File "C:\Users\Bobby\Documents\GitHub\InstaPy\instapy__init__.py", line 1, in
from .instapy import InstaPy
File "C:\Users\Bobby\Documents\GitHub\InstaPy\instapy\instapy.py", line 15, in
from .clarifai_util import check_image
File "C:\Users\Bobby\Documents\GitHub\InstaPy\instapy\clarifai_util.py", line 3, in
from clarifai import rest
File "C:\Users\Bobby\AppData\Local\Programs\Python\Python36\lib\site-packages\clarifai-2.0.31-py3.6.egg\clarifai\rest__init__.py", line 3, in
File "C:\Users\Bobby\AppData\Local\Programs\Python\Python36\lib\site-packages\clarifai-2.0.31-py3.6.egg\clarifai\rest\client.py", line 14, in
ModuleNotFoundError: No module named 'requests'

Running on Windows 10 right after I used the Windows PowerShell script and configured my username, password, and likes with the GUI.

help wanted

Most helpful comment

On the command line do: __pip install requests__

All 22 comments

I did not stop the import of clarifai as it was not being imported as said in the Documentation. Is there an updated line I should stop the import of?

On the command line do: __pip install requests__

hi guys, i'm having a similar problem -
C:\Users\Patrick\Documents\GitHub\InstaPy>py -3.6 quickstart.py
Traceback (most recent call last):
File "quickstart.py", line 3, in
from instapy import InstaPy
File "C:\Users\Patrick\Documents\GitHub\InstaPy\instapy__init__.py", line 2, in
from .instapy import InstaPy
File "C:\Users\Patrick\Documents\GitHub\InstaPy\instapy\instapy.py", line 18, in
import requests
ModuleNotFoundError: No module named 'requests'

sorry, newbie here. how do i solve this?

Same answer as above.

@cclauss , i've already installed requests:

C:>pip install requests
Requirement already satisfied: requests in c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages (from requests)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages (from requests)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages (from requests)

then when I run quickstart.py:

C:\Users\Patrick\Documents\GitHub\InstaPy>quickstart.py
Traceback (most recent call last):
File "C:\Users\Patrick\Documents\GitHub\InstaPy\quickstart.py", line 3, in
from instapy import InstaPy
File "C:\Users\Patrick\Documents\GitHub\InstaPy\instapy__init__.py", line 2, in
from .instapy import InstaPy
File "C:\Users\Patrick\Documents\GitHub\InstaPy\instapy\instapy.py", line 18, in
import requests
ModuleNotFoundError: No module named 'requests'

can you help please...

Run the following and paste the responses:
which python
which pip

is this for looking up the version? for some reason this command doesn't work for me, but i typed the following and got the following responses -

C:>pip --version
pip 9.0.3 from c:\users\patrick\appdata\local\programspythonpython36-32\lib\site-packages (python 3.6)

C:>python --version
Python 3.6.3

__which__ does not work because @yg2dras1 is running on Windows.

The answer above should work, else try python -m pip install -U requests

@Tjorriemorrie , @cclauss , thank you for your input. really appreciate it. still a noob here.

i've tried your suggestion @Tjorriemorrie , it indicated that requests is already installed

maybe i should uninstall and reinstall??

Nope. Try:

Overall I would guess that there are multiple versions of Python on your computer and the one that is running InstaPy is different from the one that you get when you type __python__ on the command line.

@cclauss yes i think i did everything, installed build tools, .net framework, i set the environment, installed selenium, pyvirtualdisplay, i placed chromedriver in assets folder and took out the .exe...

@cclauss so I did what you said -

C:\Users\Patrick>pip freeze
certifi==2018.1.18
chardet==3.0.4
EasyProcess==0.2.3
emoji==0.4.5
idna==2.6
pipenv==11.9.0
PyVirtualDisplay==0.2.1
requests==2.18.4
urllib3==1.22
virtualenv==15.2.0
virtualenv-clone==0.3.0

C:\Users\Patrick>python -c "import requests ; print(requests.__version__)"
2.18.4

so...what does this mean? it means requests is there right...

Correct. You have a relatively current Python (3.6.3 vs. 3.6.4) and you have a current requests properly installed in it. That means that you have at least two different versions of Python on your machine and that the version of Python that is running InstaPy is not the same one that you are getting when you type __python__ on the command line.

so that's it!! ok so how do i fix it? haha!

Sorry... I am not a Windows guy.

ok. in any case this was very helpful!

@yg2dras1 C:>__python3 quickstart.py__ # Does that work?

@cclauss tried it, doesn't work...

it's ok. i'm looking at installing ubuntu now. i've given up on windows. haha!

You can try anaconda as well, but you'll have to use conda instead of python I think to run and install stuff. Can just check their documentation.

ModuleNotFoundError: No module named 'clarifai'

Anyone getting this error too ?

@vnkvp python3 -m pip clarifai

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Spyd3r0us picture Spyd3r0us  路  3Comments

harrypython picture harrypython  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

seuraltimez picture seuraltimez  路  3Comments