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

Migrate looseversion to fix distutils issues #1641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eddtries
Copy link

@eddtries eddtries commented Nov 1, 2023

I've submitted a patch to quickly fix the LooseVersion issues stopping undetected-chromedriver working with >= Python 3.12.0 since distutils was deprecated. It uses a third party library without many stars, so there's a risk there, and if someone wants to fix it properly by replacing LooseVersion with a custom type that'd be awesome - this is just a quick fix to get things working if needed.

@max32002
Copy link

max32002 commented Nov 2, 2023

ModuleNotFoundError: No module named 'looseversion', if python < 3.12.0

@eddtries
Copy link
Author

eddtries commented Nov 2, 2023

ModuleNotFoundError: No module named 'looseversion', if python < 3.12.0

Did you pip install -r requirements.txt first? If so, what was the output?

If this doesn't work then we'd need to follow the Python 3.12.0 migration guide which is a little more work :(

@max32002
Copy link

max32002 commented Nov 2, 2023

ModuleNotFoundError: No module named 'looseversion', if python < 3.12.0

Did you pip install -r requirements.txt first? If so, what was the output?

If this doesn't work then we'd need to follow the Python 3.12.0 migration guide which is a little more work :(

after
python -m pip install looseversion

done, thank you very much.

@boludoz
Copy link

boludoz commented Nov 9, 2023

try:
    from distutils.version import LooseVersion
except ModuleNotFoundError:
    from packaging.version import parse as LooseVersion

@belthaZornv
Copy link

Any news on merging this? or? - seems to still be an issue with 3.12.

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

Successfully merging this pull request may close these issues.

4 participants