python-3.x - 没有名为 future 的模块

标签 python-3.x raspbian

我在 python 中运行一个电报机器人,我在 raspbian ( pi3 ) 上使用 python3.6

以下是我的进口:

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

当我尝试使用 sudo python3 bot.py 运行我的机器人时,我得到了
ImportError: No module named 'future'

我已经搜索并找到了很多关于此的答案,但没有一个对我有用,例如 pip install futurepip3 install future该模块确实显示在我的 python 3.6 库中 future in lib

知道为什么它仍然显示No module named future ? ?

最佳答案

我尝试了安装、重新安装、easy_install 和 conda install,但对我没有任何帮助。我终于能够通过在 future 运行升级来导入我的包。

pip install -U future 

这解决了我的问题。

关于python-3.x - 没有名为 future 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49353905/

相关文章:

c - Raspberry Pi - C 程序不写入文本文件

linux - X11 依赖项,不使用 X11 编译 Dbus,仅启动 Shell C++ 应用程序 Raspbian Linux

linux - 无法在树莓派上使用 bluez-tools 将蓝牙设备设置为受信任

java - 在 Raspberry Pi 上运行 Javafx GUI

python - 打印来自 Python 生成器的所有结果

带有波斯语/阿拉伯语字符的 Python 3 print() 函数

python - KeyError : 'Name' , 有什么问题?

linux - 在 ARM 程序集中写入文件

python - 在 R 中用 python 重写 t 检验的问题

python-3.x - 使用 Python3.x 的 Pyinstaller