jjzjj

linux - Python ImportError no module named statistics 下载后

coder 2023-06-22 原文

我正在尝试运行我的代码,但我不知道我需要什么特定的包才能使我的导入语句起作用。下面是我的标题,我不断收到一条错误消息,提示 ImportError no module named statistics。我查看了很多不同的页面,想看看在哪里可以下载解决方案,但我被困住了。我知道我的代码有效,因为我在我的学校实验室中运行了它。如果有人可以提供帮助,那就太好了! 请注意,我是一名初学者,正在使用 Python 2.7 在我的虚拟机上使用 Linux

import sys
import requests
import matplotlib.pyplot as plt
import statistics as stat  

最佳答案

Statistics “3.4 统计模块的 Python 2.* 端口”(PyPI)。

如果你使用 2.7.9,你将安装 pip,2.7 目录中的 pip install statistics 应该安装 2.7 的模块(我不是 pip或虚拟机专家,因此可能略有偏差。)

关于linux - Python ImportError no module named statistics 下载后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27582551/

有关linux - Python ImportError no module named statistics 下载后的更多相关文章

随机推荐