vimeo.py
vimeo.py copied to clipboard
error importing vimeo: Python 3
Exception has occurred: ModuleNotFoundError No module named 'urlparse'
It seems that this library name was changed on Python 3
Seeing the same issue on Python 3:
Exception has occurred: ModuleNotFoundError
No module named 'urlparse'`
Did you do pip install vimeo
instead of pip install PyVimeo
? They are different packages, and the vimeo package doesn't support python 3.
I have allmost the same problem. Both pip installed vimeo and PyVimeo. I get "ImportError: No module named vimeo" in Python 2 and "ModuleNotFoundError: No module named 'vimeo'" in Python 3.
@learningtour make sure your python file is not called vimeo.py.
This works in Python 3 now. If it doesn't, it's probably because you're using a file or local folder called vimeo
- which would be a naming conflict.
I upgraded my Python version to Python 3.9 and get the same error. I don't have a vimeo
local file or folder. I installed Python3 with:
brew install [email protected]
Vimeo with:
python3 -m pip install vimeo
and when I run it, I see:
File "/usr/local/lib/python3.9/site-packages/vimeo/__init__.py", line 8, in <module>
from vimeo.client import Client
File "/usr/local/lib/python3.9/site-packages/vimeo/client.py", line 5, in <module>
import urlparse
ModuleNotFoundError: No module named 'urlparse'
If I "monkey-patch" it by changing that line to:
import urllib.parse as urlparse
then I see another error:
File "/usr/local/lib/python3.9/site-packages/vimeo/__init__.py", line 8, in <module>
from vimeo.client import Client
File "/usr/local/lib/python3.9/site-packages/vimeo/client.py", line 6, in <module>
from urllib import urlencode
ImportError: cannot import name 'urlencode' from 'urllib' (/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/__init__.py)
When I installed it with Python3.10, I got another error, which made me downgrade to 3.9.
When I install PyVimeo
instead of vimeo
, my code works well.