简体   繁体   中英

vlc import error in python script + ubuntu 14.04LTS

I want to import the vlc from my python script, but it is getting error like follows:

Traceback (most recent call last): File "test.py", line 3, in import vlc ImportError: No module named vlc

How to solve this problem??

looks like your files are not on "sys.path", from where usually python tries to pick up imports

Try and access from interpreter. just type "import vlc" and see if that works.

If it does't work then just copy your vlc module files (I guess its vlc.py) to your python sys.path location and try again

go through these links, it may help

https://docs.python.org/2/using/cmdline.html#environment-variables https://docs.python.org/2/library/sys.html#sys.path

Try to use pip install python-vlc in command prompt (if you are using windows). This will remove that error, as vlc is not yet installed on your system. If you are using Ubuntu or other Linux Kernel OS, then first install pip (and python) on your system using whatever your package manager is (if necessary), then do pip install python-vlc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM