nickpettican / InstaBot

:robot: Automate your Instagram activity with InstaBot, a customisable bot that likes, follows and comments
Apache License 2.0
224 stars 51 forks source link

Error on start ImportError: No module named requests #54

Closed ph0rest closed 5 years ago

ph0rest commented 5 years ago

Hi, I've got this on start:

`InstaBot-master me$ python run.py

Traceback (most recent call last):

File "run.py", line 23, in from src.instabot import InstaBot File "/Users/me/InstaBot-master/src/instabot.py", line 26, in from requests import Session

ImportError: No module named requests`

Please help

nickpettican commented 5 years ago

Hi @phorest0, you have to run pip install -r requirements.txt to install the required library, in this case requests

ph0rest commented 5 years ago

Hey @nickpettican , all requirements has been installed.

The weird thing is that the bot worked for several days. During these days I had to install on the MacOs system Python v 3.7. And today I decided to restart the bot with the new settings and got this error. Today I also tried to install the bot on a second computer from scratch. The result is the same .. Any ideas?

ph0rest commented 5 years ago

Right after restarting I've got this: image

then I've put Python file in this folder and now i've got this

screen shot 2019-02-02 at 12 51 24
ph0rest commented 5 years ago

Ok, Never mind! I've tried to delete and put different python files to this folder: "/usr/local/bin/" and the magic come back! Anyway, Thank you for helping mate!

screen shot 2019-02-02 at 13 06 54

File that helps:

screen shot 2019-02-02 at 13 19 37

Technically, You're just need to reinstall your Python 2.7 in this case, i suppose

nickpettican commented 5 years ago

It can get a bit messy to have different versions of python 😅. I recommend using conda to manage python versions and environments. Let me know if you get it sorted 👍

nickpettican commented 5 years ago

Closing this, as I assume it works now :)