Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error importing vimeo: Python 3 #172

Open
joaolessab opened this issue May 18, 2021 · 6 comments
Open

error importing vimeo: Python 3 #172

joaolessab opened this issue May 18, 2021 · 6 comments

Comments

@joaolessab
Copy link

Exception has occurred: ModuleNotFoundError
No module named 'urlparse'

It seems that this library name was changed on Python 3

@mteece
Copy link

mteece commented May 18, 2021

Seeing the same issue on Python 3:

Exception has occurred: ModuleNotFoundError
No module named 'urlparse'`

@RButtsCHQ
Copy link

Did you do pip install vimeo instead of pip install PyVimeo? They are different packages, and the vimeo package doesn't support python 3.

@learningtour
Copy link

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.

@ecandino
Copy link

@learningtour make sure your python file is not called vimeo.py.

@KalobTaulien
Copy link

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.

@mm3509
Copy link

mm3509 commented Jul 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants