Library problem under python 2.7
See original GitHub issueHello, I’m trying to import ffmpeg into python script, but it looks like I have syntax problem.
import ffmpeg
stream = ffmpeg.input('input.mp4')
stream = ffmpeg.hflip(stream)
stream = ffmpeg.output(stream, 'output.mp4')
ffmpeg.run(stream)
I get syntax error
File "pipe_stream.py", line 29, in <module>
import ffmpeg
File "/home/nvidia/.local/lib/python2.7/site-packages/ffmpeg/__init__.py", line 1, in <module>
from .ffmpeg import FFmpegError
File "/home/nvidia/.local/lib/python2.7/site-packages/ffmpeg/ffmpeg.py", line 52
self._input_files.append(FFmpeg._File(url=url, options={**options, **kwargs}))
^
SyntaxError: invalid syntax
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Python 2.7 — pip issue installing almost any library - Medium
I've been working with Python 3 for a while, but recently I was involve in an automation project that required python 2.7.5.
Read more >Python Libraries installing to Python 2.7 by default
The best is to use alias , as this answer describes changing default Python version in Mac can cause multiple issues.
Read more >Linking to system python lib fails… | Apple Developer Forums
This rebuilt the directory but started causing the issue defined in this thread and linking with the Python 2.7 libraries for my projects....
Read more >Issue 27435: ctypes library loading and AIX - Python tracker
RTLD_MEMBER is a well documented constant needed for AIX dlopen. It is hard-coded in __init__.py > 2. Basic ctypes.util.find_library("crypto") ...
Read more >os — Miscellaneous operating system interfaces — Python ...
All functions in this module raise OSError (or subclasses thereof) in the case of invalid or inaccessible file names and paths, or other...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The error doesn’t look like it came from this ffmpeg-python library. How did you install ffmpeg-python?
Note that it’s
pip install ffmpeg-python
, notpip install ffmpeg
or whatever.The same problem for me, it works fine with Python3 but not with 2.7