Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 使用moviepy创建文本剪辑时出错_Python 2.7_Imagemagick_Moviepy - Fatal编程技术网

Python 2.7 使用moviepy创建文本剪辑时出错

Python 2.7 使用moviepy创建文本剪辑时出错,python-2.7,imagemagick,moviepy,Python 2.7,Imagemagick,Moviepy,我正在尝试创建一个文本剪辑。但这给了我一个错误: >>> from moviepy.editor import * >>> text = (TextClip("asdasda",color='white').set_pos((20,190))) [MoviePy] This command returned an error !Traceback (most recent call last): File "<stdin>", line 1,

我正在尝试创建一个文本剪辑。但这给了我一个错误:

>>> from moviepy.editor import *
>>> text = (TextClip("asdasda",color='white').set_pos((20,190)))

[MoviePy] This command returned an error !Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/VideoClip.py", line 1173, in __init__
raise IOError(error)
IOError: MoviePy Error: creation of None failed because of the following error:

convert: not authorized `@/tmp/tmpTs7EU5.txt' @ error/property.c/InterpretImageProperties/3405.
convert: no images defined `PNG32:/tmp/tmpy1f1J0.png' @ error/convert.c/ConvertImageCommand/3210.


This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect
>>从moviepy.editor导入*
>>>text=(TextClip(“asdasda”,color='white')。设置位置((20190)))
[MoviePy]此命令返回错误!回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/usr/local/lib/python2.7/dist packages/moviepy/video/VideoClip.py”,第1173行,在__
引发IOError(错误)
IOError:MoviePy错误:由于以下错误,创建None失败:
convert:notauthorized`@/tmp/tmpTs7EU5.txt'@error/property.c/interpretatimageproperties/3405。
convert:未定义图像'PNG32:/tmp/tmpy1f1J0.png'@error/convert.c/ConvertImageCommand/3210。
此错误可能是由于计算机上未安装ImageMagick,或者(对于Windows用户)没有在conf.py文件中指定ImageMagick二进制文件的路径,或者指定的路径不正确


最后一行说我还没有安装ImageMagick。但是我已经用这个命令安装了
sudo apt get install libmagickwand dev
,并且安装正常。我还通过
pip install moviepy
正常安装了
moviepy
。我还安装了
pip安装棒

它们是否都已完全安装且没有错误?ImageMagick是在PATH环境变量中还是在moviepy可以找到它的地方?您是否拥有/tmp的适当权限和足够的空间?是的,安装时没有错误。这是否回答了您的问题?