gpt4 book ai didi

python - 修复 matplotlib 'not installed as framework' 错误,不更改 $HOME 中的 .matplotlib 配置

转载 作者:行者123 更新时间:2023-11-28 19:47:06 24 4
gpt4 key购买 nike

<分区>

上下文

  • 机器:64 位 Mac
  • 操作系统:macOS 10.10.5

错误信息

在类(class) [Jerry Kurata 'Tensorflow: Getting Started'] 之后运行了以下内容:

import tensorflow as tf
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib.animation as animation

num_house = 160
np.random.seed(42)
house_size = np.random.randint(low=1000, high=3500, size=num_house)

np.random.seed(42)
house_price = house_size * 100.0 + np.random.randint(low=20000, high=70000, size=num_house)

plt.plot(house_size, house_price, "bx")
plt.xlabel("price")
plt.ylabel("size")
plt.show

收到这个错误

**RuntimeError**:Python 未作为框架安装。如果 Python 未作为框架安装,Mac OS X 后端将无法正常运行。

尝试修复

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