WSL-Distribution-Switcher
WSL-Distribution-Switcher copied to clipboard
ImportError: No module named request when running get-prebuilt.py
I followed all steps according to https://www.kali.org/tutorials/kali-on-the-windows-subsystem-for-linux/ But when I get to the get-prebuild.py phase I get the following.
C:\WSL-Distribution-Switcher>python get-prebuilt.py kalilinux/kali-linux-docker
Traceback (most recent call last):
File "get-prebuilt.py", line 7, in
What am I doing wrong here?
KR
Try installing requests: pip install requests
You also need to set the right paths and stuff so the env can find python and the manually added modules
hi i have the same problem tried installing requests pip is ok how do i set the patchs and env and modules?
its same here
change import from urllib.request to urllib. that fixed this error for me.
This is likely because you have python version 2 in your path before version 3.
You could remove python 2 from the path or put it after python 3 in the path, however, the *.py scripts are written in a way such that you can run them without the leading python command and it knows to use python 3. i.e. just run "get-prebuilt.py kalilinux/kali-linux-docker" - no leading "python "