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

module named 'distutils.spawn' not found (triggered by ../../wpt lint call) #27180

Closed
TalbotG opened this issue Jan 14, 2021 · 5 comments
Closed

module named 'distutils.spawn' not found (triggered by ../../wpt lint call) #27180

TalbotG opened this issue Jan 14, 2021 · 5 comments

Comments

@TalbotG
Copy link
Contributor

@TalbotG TalbotG commented Jan 14, 2021

@web-platform-tests/admins

Dear fellow advanced GitHub colleagues,

I was creating PR27179 and did what I always do : '../../wpt lint' and I got this response:
{
Traceback (most recent call last):
File "../../wpt", line 5, in
from tools.wpt import wpt
File "/home/gerard/Documents/github/web-platform-tests/tools/wpt/wpt.py", line 10, in
from . import virtualenv
File "/home/gerard/Documents/github/web-platform-tests/tools/wpt/virtualenv.py", line 5, in
from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils.spawn'
}

The good news is I was still able to submit such PR (but without a prior lint validation check).

All the best to you in 2021 (and lots of vaccination in 2021)

Gérard

@sideshowbarker
Copy link
Member

@sideshowbarker sideshowbarker commented Jan 14, 2021

I can’t reproduce in my macOS environment — neither in my existing wpt clone nor after cloning the repo from scratch and testing in that. But I guess that’s unsurprising, because it just means I have python distutils installed.

I think you can solve this by installing distutils — either using whatever package manager your OS/system provides, or else pip.

As far as I can from looking at that wpt infra bits, there’s nothing in there which installs distutils; instead the code just expects it to be installed in whatever python environment you’re using to run wpt stuff.

@TalbotG
Copy link
Contributor Author

@TalbotG TalbotG commented Jan 14, 2021

Michael,

Thank you for your quick response.

From what I can see, python3-distutils package has to be the package to install.

https://packages.debian.org/buster/python3-distutils

"
This package contains the distutils module from the Python standard library.
"
I use Debian 10 (buster). Right now, python3-distutils package is indeed not installed on my system.

@TalbotG
Copy link
Contributor Author

@TalbotG TalbotG commented Jan 14, 2021

Okay... I just installed

https://packages.debian.org/buster/python3-distutils version 3.7.3-1

and

https://packages.debian.org/buster/python3-lib2to3 version 3.7.3-1

Michael, do you know of a way by which I can verify that everything is in order now and functionning accordingly?

@sideshowbarker
Copy link
Member

@sideshowbarker sideshowbarker commented Jan 14, 2021

Michael, do you know of a way by which I can verify that everything is in order now and functionning accordingly?

As far as the immediate issue, just re-run wpt lint?

@TalbotG
Copy link
Contributor Author

@TalbotG TalbotG commented Jan 14, 2021

I have re-run wpt lint and it worked!

Thank you for your assistance, Michael. This is greatly appreciated.

I am closing this issue now.

@TalbotG TalbotG closed this Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants