windows-subsystem-for-linux

Install python 3.10 on Debian 11 WSL to replace default version

Install python 3.10 on Debian 11 WSL to replace default version Question: I would like to install Python 3.10.10 on my WSL Debian System. In particular I want to install it in the root usr/bin. The idea is that Debian uses python 3.10 as default python. Right now it uses 3.9. What I tried was: …

Total answers: 2

Request.get suddenly started hitting "Temporary failure in name resolution" error

Request.get suddenly started hitting "Temporary failure in name resolution" error Question: I have a script that scrapes new chapters from a specific novel on ncode.syosetu.com every week, I need the text for tts, but this last week I suddenly started getting an error from it when it runs. requests.exceptions.ConnectionError: HTTPSConnectionPool(host=’ncode.syosetu.com’, port=443): Max retries exceeded with …

Total answers: 1

ModuleNotFoundError: No module named 'pyomo'

ModuleNotFoundError: No module named 'pyomo' Question: I am trying to run a jupyter notebook with pyomo, but get this error when trying to import from pyomo.environ. !sapt-get install -y -qq coinor-cbc from pyomo.environ import * E: Could not open lock file /var/lib/dpkg/lock-frontend – open (13: Permission denied) E: Unable to acquire the dpkg frontend lock …

Total answers: 1

issues with Docker on wsl (ubuntu 22.04)

issues with Docker on wsl (ubuntu 22.04) Question: An attempt to build a docker image fails on RUN pip install -r requirements.txt step with the following error: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError("HTTPSConnectionPool(host=’pypi.org’, port=443): Read timed out. (read timeout=15)")’: /simple/asgiref/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection …

Total answers: 2

vscode: switching between wsl/ubuntu and windows

vscode: switching between wsl/ubuntu and windows Question: I have been doing most of my python development under windows. The app however will be deployed on linux – so i would like to test it on linux. i have installed Ubuntu for windows and WSL extension for vscode. i have also mounted my windows project folder …

Total answers: 1

How to set the Ubuntu Python3 interpreter path in VS Code?

How to set the Ubuntu Python3 interpreter path in VS Code? Question: I’m using Python3 on Ubuntu 20.04 inside WSL2, running print(sys.executable) outputs /usr/bin/python3 Within VS Code, pressing "Select Interpreter" then "Enter Interpreter Path" I have tried both /usr/bin/python3 and the full windows path \wsl$Ubuntu/usrbin/python3 (which is reachable inside file explorer). Both paths returns the …

Total answers: 1

import matplotlib.pyplot hangs on ubuntu

import matplotlib.pyplot hangs on ubuntu Question: I am using a Python3 installation in a Ubuntu distribution in WSL2 on a Windows 10 machine. Over the last two months, i did not code that much. Now i started again and faced the following issue: The following code hangs for ~2min: import matplotlib.pyplot After 2 min, i …

Total answers: 1

/usr/include Directory on WSL

/usr/include Directory on WSL Question: I am using WSL on Windows and in the directory /usr/include I have a subdirectory called python3.8. As I understood the /usr/include includes the header files for C compilers. I have installed python3.10 but it seems that python3.8 exists by default in WSL. Hence, I am having some conflicts with …

Total answers: 1

SSL: CERTIFICATE_VERIFY_FAILED when using pretrained detectron2 model

SSL: CERTIFICATE_VERIFY_FAILED when using pretrained detectron2 model Question: I am trying to just use the pretrained mask_rcnn_R_50_FPN_3x model in detectron2 on an image. I get the error ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131). I am using Windows Subsystem for Linux. The following code produces the error. from detectron2.config …

Total answers: 2

Read Files across File Systems (PyCharm Windows/WSL)

Read Files across File Systems (PyCharm Windows/WSL) Question: I’m using PyCharm with a WSL interpreter because I need to use a library that doesn’t work well with Windows (gtsam, if you’re wondering). I have a pandas Dataframe stored as a pickle file on my "regular" workspace, e.g. "C:somewindowspathtofile.pkl", and I want to read it in …

Total answers: 2