Import Vlc module in python

前端 未结 4 1052
情歌与酒
情歌与酒 2020-12-21 16:03

I am trying to create a media player using vlc and python but it throws an Error which is No module named vlc. how to fix this?

相关标签:
4条回答
  • 2020-12-21 16:21

    There is also python-vlc

    https://pypi.python.org/pypi/python-vlc/1.1.2

    Download the .tar.gz file into your project and unzip it. Once unzipped, run:

    python setup.py install
    

    This will install the python-vlc module for you and then try importing it in your python script.

    P.S Make sure you are inside the unzipped folder and you can see the setup.py file.

    0 讨论(0)
  • 2020-12-21 16:26

    I had a same issue. You should try sudo pip install python-vlc

    0 讨论(0)
  • 2020-12-21 16:31

    Install

    $ sudo pip install python-vlc
    

    Then you can import the python module

    import vlc
    
    0 讨论(0)
  • 2020-12-21 16:32

    The answer didn't work for me, using Mu 1.0.2 on a Raspberry Pi, this did however:

    sudo pip3 install vlc

    0 讨论(0)
提交回复
热议问题