No module named future

PeppaPigKilla picture PeppaPigKilla · Mar 19, 2018 · Viewed 33.8k times · Source

I am running a telegram bot in python and i am using python3.6 on raspbian ( pi3 )

Below is my imports:

from __future__ import (absolute_import, division,
                    print_function, unicode_literals)
from builtins import (
    bytes, dict, int, list, object, range, str,
    ascii, chr, hex, input, next, oct, open,
    pow, round, super,
    filter, map, zip)
from uuid import uuid4

import re
import telegram

from telegram.utils.helpers import escape_markdown

from telegram import InlineQueryResultArticle, ParseMode, \
    InputTextMessageContent
from telegram.ext import Updater, InlineQueryHandler, CommandHandler
import logging
import random
import telepot
import unicodedata
import json
import requests
import bs4
from bs4 import BeautifulSoup

When i try to run my bot with sudo python3 bot.py i get

ImportError: No module named 'future'

I have searched and found many answers on this but none have worked for me such as pip install future and pip3 install future The module does show in my lib for python 3.6 future in lib

Any idea why it still says No module named future? ?

Answer

jkulpe picture jkulpe · Sep 4, 2018

I ran into a similar problem using Python code written by someone else. See http://python-future.org/. future is a module that aids in conversion between Python 2 and 3. It was an easy installation for me by doing pip3 install future