linux

Why pip saying import error after downgrading?

Why pip saying import error after downgrading? Question: I downgraded pip to install some packages. but now pip is not working saying. my python version is 3.11.5 and used this command “sudo python -m pip install pip==18.0 –upgrade”. Here is the result for pip install <module_name> I was expecting any solution for this issue as …

Total answers: 2

Run pyautogui script inside a docker container to control the host screen

Run pyautogui script inside a docker container to control the host screen Question: At work we are using docker container to run our script on a custom made Linux machine, with a touch screen display. I’m the QA there and I want to create some automation tests, that should perform virtual touch clicks. My problem …

Total answers: 2

Ara issues in python

Ara issues in python Question: I am facing this issue when I try to enter an ara command: user@server:~ ara playbook list /usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py:58: UserWarning: No directory at: /home/user/.ara/server/www/static/ mw_instance = middleware(adapted_handler) I am running this in Ubuntu 20.04.6 LTS. user@server:~$ which python3 /usr/bin/python3 user@server:~$ python3 –version Python 3.8.10 user@server:~$ pip list | grep ara ara …

Total answers: 1

How not to mess terminal up after sys.stdin.read() and subprocess invoking vim?

How not to mess terminal up after sys.stdin.read() and subprocess invoking vim? Question: I want to create interactive mode code like git rebase -i HEAD~6 but for PIPE editing, stdin redirection. another example is vipe of moreutils. To do that, I learn this code below. # Source: https://stackoverflow.com/a/39989442/20307768 import sys, tempfile, os from subprocess import …

Total answers: 1

Python in Linux: "ImportError: No module named X", but library exists

Python in Linux: "ImportError: No module named X", but library exists Question: I’ve recently updated a python script of mine in my server after installing Selenium. Whenever I try to execute the script: I get "ImportError Module: No module named schedule", even tho it is installed: Defaulting to user installation because normal site-packages is not …

Total answers: 1

New Debian OS-release

Programmatically check if there is a new Debian OS release Question: I was wondering if there was a way of finding out programmatically (e.g., a command that I can run from a Python script) if there is a new Debian OS release. I know that apt get update gives me info about upgradable packages, but …

Total answers: 1

Ansible – How to get the value of a variable that's inside a List of Dicts?

Ansible – How to get the value of a variable that's inside a List of Dicts? Question: I need to get the value of the $HOME path of newly created users with the module ansible.builtin.user. Here’s the playbook: — – name: Create users vars: users: user1: passwd: uid: ‘1111’ comment: ‘Test User’ shell: ‘/bin/zsh’ user2: …

Total answers: 2

How to cure Google Colab with miniconda installed and get on import ModuleNotFoundError?

How to cure Google Colab with miniconda installed and get on import ModuleNotFoundError? Question: I have used Google Colab for more than half a year successfully for a special application. In the beginning of my Colab-notebook script I install conda and use conda-forge for installing a key Python package. At the beginning of this year …

Total answers: 1