Reputation: 85
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??
Upvotes: 2
Views: 1721
Reputation: 11
For people stumbling upon this answer in 2020 and using Debian Linux, try the following command:
sudo pip3 install python-vlc
Upvotes: 1
Reputation: 1
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.
Upvotes: 0
Reputation: 435
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
Upvotes: 0