No module named future

强颜欢笑 提交于 2021-02-08 12:18:53

问题


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? ?


回答1:


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




回答2:


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.




回答3:


I had the similar problem, solved it using easy_install future




回答4:


I had the similar problem, solved it using conda install future




回答5:


None of these work for me, despite uninstalling the module, then reinstalling it with pip3 install future I keep getting the error (trying to run ardupilot's sim_vehicle.py --console --map in case it matters)



来源:https://stackoverflow.com/questions/49353905/no-module-named-future

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!