导入moviepy和matplotlib.pyplot

时间:2018-03-20 01:31:22

标签: python python-3.x matplotlib terminal moviepy

在使用特定导入时,我在终端中收到一个奇怪的输出。

import moviepy.editor as mpy

使用此行运行任何python脚本将输出:

2018-03-19 18:13:35.658 python[84216:4690705] 18:13:35.657 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h. 

这不是我主要担心的,因为警告是明确的,我的电影将包含以给定的每秒帧速率显示的多个.png文件。但是,使用plt.plot(通过matplotlib.pyplot)会创建我关注的奇怪输出。使用不numpy的{​​{1}} 会导致奇怪的输出。

matplotlib

情节将正确显示。下面是奇怪的终端输出。

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)
plt.plot(x, y)
plt.show()

这是什么意思?为什么会这样?这是一个需要修复的错误吗?这可以避免吗?

0 个答案:

没有答案