I deleted and reinstalled Ubuntu by following the instructions here but the same issues with pip installation persisted even after I've reinstalled Ubuntu. I suspect that the re-installation process did not totally help me remove Ubuntu.
Just to be clear that the Ubuntu I am installing is a bash shell and not a disk image that requires partitioning - just downloading a copy of Ubuntu from Windows Store would do in my case
How can I cleanly remove all of Ubuntu bash files on (Windows 10 Version 10.0.17763 Build 17763)?
The steps I took to reinstall are:
- Uninstall Ubuntu under programs and features
- Deselect Windows Subsystem of Linux from apps & features
- Restart on clean reboot (as prompted by windows)
- Reinstall Ubuntu on Windows Store
- Setup
- Run sudo apt-get update
- Run pip installation
I've seen other methods of uninstalling such as wslconfig.exe /u Ubuntu
, but I did the aforementioned way because of the Fall Creators update which allows this method. I'm not sure what's the difference between them and if it will make a difference in my case.
However, the same pip issues persisted, does this way of reinstalling guarantee that I get a fresh copy of python environment? What have I possibly done wrong?
The reason why I wanted to reinstall Ubuntu is because my pip is not functioning properly on only Ubuntu and not on Windows OS. The example is as follows: example
Any advise will be greatly appreciated. Thank you!
Further details about what other stuff I have tried to troubleshoot the pip installation
CACHING
Some recommended to use --no-cache-dir
but it did not work and I even tried rm -rf ./cache/pip
but that also did not work. So I reinstalled Ubuntu WSL, hoping that it will work but it didn't.
NETWORK ISSUE
ping pypi.org
does not work and returns the following message and freezes
PING pypi.python.org(2a04:4e42:2::223 (2a04:4e42:2::223)) 56 data bytes
What I have done about this issue:
1.Tried disabling IPv6 as recommended by @Kulfy here
Got the following error:
sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/default/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/lo/disable_ipv6: No such file or directory
2.Copied and pasted the following into Ubuntu: Tried with sudo and root with the command below
sudo/root
cat >/etc/modprobe.d/blacklist-ipv6.conf <<EOF
# Turn of IPv6 by blacklisting the module.
# Even though it isn't needed.
blacklist ipv6
EOF
$
It returned the following -bash: /etc/modprobe.d/blacklist-ipv6.conf: Permission denied
as recommended here but also did not work
- Setting Preferences for IPv4 over IPv6
I have also set preferences for IPv4 by uncommenting these codes and editing the file by doing
sudo vi /etc/gai.conf
and then... uncommenting
#For sites which prefer IPv4 connections change the last line to
precedence ::ffff:0:0/96 100
...
# For sites which use site-local IPv4 addresses behind NAT there is
# the problem that even if IPv4 addresses are preferred they do not
# have the same scope and are therefore not sorted first. To change
# this use only these rules:
#
scopev4 ::ffff:169.254.0.0/112 2
scopev4 ::ffff:127.0.0.0/104 2
scopev4 ::ffff:0.0.0.0/96 14
This is as recommended here
This still has not worked. So, it may not be an issue with IPv6
sudo apt update
successfully? – Kulfy May 23 '20 at 09:03pypi.python.org
from the venv? – Kulfy May 23 '20 at 09:11