gpt4 book ai didi

linux - Python ImportError no module named statistics 下载后

转载 作者:IT王子 更新时间:2023-10-29 01:00:42 32 4
gpt4 key购买 nike

我正在尝试运行我的代码,但我不知道我需要什么特定的包才能使我的导入语句起作用。下面是我的标题,我不断收到一条错误消息,提示 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/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com