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
? ?
__future__ module is a built-in module in Python that is used to inherit new features that will be available in the new Python versions.. This module includes all the latest functions which were not present in the previous version in Python.
For files with from __future__ import annotations it automatically unquotes stringified type hints.
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
I tried install, reinstall, easy_install and conda install but nothing worked for me. I was finally able to import my package by running upgrade on future.
pip install -U future
This solved my issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With