Forums

no module named instabot... But it is installed.

Hey all,

I have been trying to get the instabot package (not instabot-py) to work. It is a neat little package to upload stuff to instagram. Check it out here: https://pypi.org/project/instabot/. It however does not seem to work on pythonanywhere. I installed it using pip3 install instabot --user, and when i run it with python3.6, it says:

File "/home/username/foldername/script.py", line 4, in <module>
from instabot import Bot
ModuleNotFoundError: No module named 'instabot'

If i run it with python, it says:

/usr/local/lib/python2.7/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.2) 
or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "/home/username/foldername/script.py", line 12, in <module>
bot = Bot()
File "/home/username/.local/lib/python2.7/site-packages/instabot/bot/bot.py", line 197, in __init__
loglevel_stream=loglevel_stream,
File "/home/username/.local/lib/python2.7/site-packages/instabot/api/api.py", line 90, in __init__
os.makedirs(base_path)  # create base_path if not exists
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '//config/'

What is going on? I have no problems whatsoever running it locally on my own machine. Does it have to do with the urllib? I tried using different versions of that too, but no succes. Is it an ill-coded piece of the package?

Thanks in advance.

When you use pip3 it will install a package for your default Python 3 version. When you run python however it will use python2.7 since this is the default Python on Ubuntu. Please read this help page and check if you're using the same version of Python for installing and running the package: https://help.pythonanywhere.com/pages/InstallingNewModules/.