wsl-2

Error Updating Python3 pip AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

Error Updating Python3 pip AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' Question: I’m having an error when installing/updating any pip module in python3. Purging and reinstalling pip and every package I can thing of hasn’t helped. Here’s the error that I get in response to running python -m pip install –upgrade pip specifically (but the …

Total answers: 3

Python versions are not changing despite activating virtual environment in WSL2

Python versions are not changing despite activating virtual environment in WSL2 Question: Background: In WSL2 (ubuntu 20.04) I created a python virtual environment inside a directory. Using the command python3 -m venv venv my system’s python version was set to python3.11 (after downloading) via sudo update-alternatives –config python3 and then choosing the version. I noticed …

Total answers: 2

Error "tcgetpgrp failed: Not a tty" using python3 to open web browser

Error "tcgetpgrp failed: Not a tty" using python3 to open web browser Question: Here’s the breakdown of my Windows WSL environment: Windows 11 WSL version 2 Ubuntu version 20.04.3 LTS Python 3.8.10 I have a super simple Python program I’m using to open a web page in my default browser. Here is my code: import …

Total answers: 2

Playing a sound with playsound in WSL gives a long list error

Playing a sound with playsound in WSL gives a long list error Question: I try to play a simple sound in my WSL Debian but I cannot fix a long list of errors. I don’t know what to do more… Searching different advise on the net, I’have installed pip install playsound apt install libcairo2-dev libgirepository1.0-dev …

Total answers: 2

Windows host can't receive UDP packets from WSL-2 guest

Windows host can't receive UDP packets from WSL-2 guest Question: I’m trying to have a simple UDP echo client/server communicate with each other. The client program (which runs in the host Windows) sends packets to the server (which runs in WSL-2), and the server receives them, but the server’s reply is never reaches the client. …

Total answers: 1

Permanently change the default Python3 version in Linux (Ubuntu on Windows)

Permanently change the default Python3 version in Linux (Ubuntu on Windows) Question: I’m using WSL2 with Ubuntu on Windows 11 v2004.2022.10 and I have both Python 3.8 and 3.9 installed. I want to make the 3.9 version the default, and I’m happy to remove Python 3.8 altogether if necessary. If I type python –version in …

Total answers: 2