Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

AttributeError: 'RawConfigParser' object has no attribute 'readfp' when running python apps

I encountered the following error when trying to run tuir and also happened with youtube-dl Traceback (most recent call last): File "/usr/bin/tuir", line 33, in <module> sys.exit(...
bazizi khaled's user avatar
0 votes
0 answers
42 views

New to Python, can't get a Github project working. can anyone help?

Trying to build the lyrics browser found here. Although I have little to no experience with Python I've managed to get the software running on a Raspberry PI 2 to a point where the main program is ...
Christof's user avatar
0 votes
1 answer
25 views

Python package installation using pip

I use Python both from Jupyter Notebook as well as directly from the terminal. My Python version is 3.10.12. I install packages both from the terminal (using pip install <package-name>) as well ...
Doi's user avatar
  • 21
1 vote
2 answers
40 views

systemd to control a daemon written in python

I have acquired a python script that is invoked at the command line and immediately returns having demonised and two processes have spawned. Unsure why two but one is the parent of the other. I wish ...
r.l.'s user avatar
  • 81
0 votes
2 answers
59 views

How to modify $PATH globally

On my Debian server I use crontab to schedule a python code. The problem is: when I add a line like this: 6 9 * * * python /path/to/daily_task.py &> $HOME/out.txt Not too surprisingly the ...
user9102437's user avatar
0 votes
1 answer
37 views

Python module not available to another user in same group

Both users foobar and foobiz are in same group on RHEL. foobar$ python3 -m pip list Package Version ----------------- ------- oracledb 1.4.2 pip 21.3.1 foobiz$ ...
zundarz's user avatar
  • 363
2 votes
1 answer
64 views

How to run python script on login

I am attempting to load a python script that launches a Firefox Geckodriver under Selenium whenever a specific kiosk user logs in to the GUI. I've tried launching this via .profile, however ...
Firav's user avatar
  • 31
1 vote
0 answers
46 views

Redirecting fifo to python's stdin

$ mkfifo mypipe $ echo "hello redirection" > mypipe $ cat < mypipe hello redirection I have problems when I try to do the above with python # pyecho.py with open("/dev/stdin&...
Tom Huntington's user avatar
2 votes
1 answer
109 views

Unable to uninstall virtualenv from debian 11

My debian OS has been through a few upgrades and is now on 11 (Bullseye). I initially started out with python2 and now I no longer want it - I just want python3. I installed virtualenv a long while ...
mulllhausen's user avatar
  • 2,700
0 votes
1 answer
45 views

How do I install a pip package on a machine without Internet access?

I'm working on a Linux machine without (direct) Internet access. I want to pip install foo for some pypi package foo, but - obviously, that won't work. I have, of course, other machines which are ...
einpoklum's user avatar
  • 9,585
1 vote
0 answers
17 views

Minimal example of new function in Qutebrowser

General overview I am trying to create a function I can call from Qutebrowser with ex mode (the commands starting with :). But I can’t find a way to do it. What I did In my config.py, I added the ...
fauve's user avatar
  • 1,248
0 votes
0 answers
19 views

Why does opencv-python-headless take so long time to complete

I've noticed that when installing opencv-python-headless using pip3, the process takes a considerable amount of time to complete. I'm curious about the factors that contribute to this lengthy ...
ianasystems's user avatar
0 votes
0 answers
22 views

External usb SSD Restic/Backrest backup automation

I've a zimaboard micro server with proxmox and a debian 10 CT that is delegate for backup system (Restic/Backrest) with an external usb ssd always attached. It is possible to pilote the external usb ...
Alessandro's user avatar
1 vote
1 answer
52 views

Function in zsh shell with pyenv and sudo call

My goal is to conveniently run a python webserver module that is loaded via pyenv and virtualenv. Depending on the port number, I might have to use sudo (port number smaller than 1025). This is what I ...
Green's user avatar
  • 51
0 votes
1 answer
24 views

send notification from one systemd unit to another with python?

I have a systemd unit 'my-app' that runs my main python app but I want it to auto-update when there is a new version on a remote server. The detection is watched by another python systemd unit (let's ...
16ar's user avatar
  • 13
0 votes
0 answers
13 views

How to forward received data towards network namespace?

My goal is to forward received data to another pc. I have three devices (A, B and C) connected into the same network. A uses pyzmq to publish data in which B is subscribed. Then, B must send this ...
Raúl Parada Medina's user avatar
0 votes
0 answers
40 views

How to forward data via netns exec namespace

I'm using zmq to receive data from another pc. I would like to formard this received data to the Internet via namespace. I've created this python script: import subprocess import zmq context = zmq....
Raúl Parada Medina's user avatar
2 votes
2 answers
374 views

How do I fix dnf after trying to remove the system Python installation?

I was trying to remove python environment and I think I accidentally removed the one comes default with fedora and makes dnf command not available. I did(not consecutively but I think those three ...
943n's user avatar
  • 21
0 votes
2 answers
122 views

Run shellcode as root in a buffer overflow attack?

I'm trying to exploit the following code: #include <stdio.h> #include <string.h> int main(int argc, char** argv){ char buffer[100]; strcpy(buffer, argv[1]); return 0; } with ...
r3k0j's user avatar
  • 15
0 votes
0 answers
112 views

How to keep a shell alive after it gets started from inside a program?

I was not sure where to ask this question, since it is a mix of both programming and Linux, but hopefully this is the right place. I have written a simple program, which I'm buffer overflowing. I have ...
r3k0j's user avatar
  • 15
0 votes
1 answer
25 views

Minecraft server (aws/linux) discord webhook error

I have a Minecraft server running on an EC2 Instance (AWS), which runs a Linux (CentOS). I altered the minecraft.service system process to ExecStart=python3 run_server.py This python script pulls a ...
Igor Blinkow's user avatar
0 votes
0 answers
84 views

ModuleNotFoundError when trying to launch lutris

I'm having an issue with the latest Lutris version 0.5.16-1. I'm using CachyOS (Arch Linux). Simply put, when I try to launch it, it doesn't start. The console says: Traceback (most recent call last): ...
BuBu's user avatar
  • 1
3 votes
1 answer
162 views

getaddrinfo doesn't return IPv6 on Linux, but does on Macbook

I have a simple setup. I added 1.2.3.4 yahoo.com to my /etc/hosts file. I didn't add any entry for google.com to the /etc/hosts file. On Macbook, I get 1.2.3.4 and yahoo.com's original IPv6 address as ...
anc's user avatar
  • 31
0 votes
0 answers
122 views

How to deal with ALSA errors

Using some very simple example code to do speech-to-text in Python it works, but spews out a stream of the following errors and warnings: Cannot connect to server socket err = No such file or ...
AlphaCentauri's user avatar
0 votes
0 answers
18 views

Get fullname of downloaded Python wheel, without merely watching the filesystem

My script downloads a "continuum-transfunctioner" wheel from a pypi server as follows: python3 -m pip download continuum-transfunctioner -i https://pypi.acme.com:8080/simple --no-...
Olumide's user avatar
  • 177
0 votes
1 answer
27 views

Too fast checking local ports with python socket

This code example is given in the book "CPython Internals". from queue import Queue import socket import time timeout = 1.0 def check_port(host: str, port: int, results: Queue): sock = ...
maskalev's user avatar
  • 125
1 vote
1 answer
38 views

Installing CodeWeavers' crossover 20.0.4 fails on Linux

I'm using Gentoo Linux and have Python 3.10 and 3.11 installed. I have a registered version of Crossover 20.0.4 that I'm trying to install using the .bin installer and I hit this error and ...
NuclearPeon's user avatar
0 votes
0 answers
31 views

Can't use RTSP VLC with python on debian

So I can't use RTSP with VLC, I saw the problem with debian policy but I don't know how to figure it out (sorry for bad english) There is my error: [00007f18a000a8c0] satip stream error: Failed to ...
Nats's user avatar
  • 1
1 vote
3 answers
123 views

Fetch data from a large file based on time and date recursively

Fetch data based on date(column 1) and time (column 2). Each date has time in column 2. Based on each date in column1 two files are to be generated which will have all the fields based on time 6:00 to ...
Gavin's user avatar
  • 91
0 votes
0 answers
35 views

Output of python script like if it's typed in interactive mode

I have a python file and I want to obtain the output just like I'm typing the content in interactive mode (like this question https://stackoverflow.com/q/59008423 but with a shell script) I try with ...
Pablo Cárdenas's user avatar
0 votes
2 answers
84 views

Cron, python and saving to a file

I've got a veeery simple script written in python that tests my internet connection na saves parsed data to a json file: #!/usr/bin/python3 import subprocess, json, os from datetime import datetime # ...
Trendkiller's user avatar
0 votes
2 answers
3k views

How to install python2.7-dev package on vanilla debian 12?

I searched in my repo but couldn't find the "python2.7-dev" to install some previously built old packages by building and installing from GitHub repo. Is there a way to sideload it?
Faisal Ahmed Moshiur's user avatar
0 votes
0 answers
26 views

Python script automation with systemD - Issues using with nmcli command ( Network Manager)

I am an embedded Electronics Engineer and for 2 two months, I have been developing using a Debian based distribution for one of my clients. I am actually developing a project that handles ...
Gronjus's user avatar
1 vote
0 answers
59 views

How to remove old pip packages after upgrade to Debian 12?

After Debian 12, my system-wide pip packages breaks. I want to remove them, using pipx instead. However, I cannot list/remove those previously installed packages. These are the files in /usr/local/bin ...
Dia's user avatar
  • 173
-1 votes
1 answer
35 views

How to read and restore the last megabyte of a drive using Python

I'm writing some code to do backups of my hard drives, using Python 3. My issue is that some RAIDs and other things hide stuff in the first and/or last megabyte of some drives. I want to make sure I ...
ForDummies's user avatar
1 vote
1 answer
85 views

Opening a terminal from Python regardless of the Distro

I'm developing a multiplatform Django project that opens a new terminal and automatically enters a Docker container, leveraging docker exec. Since this application must be OS agnostic, it is able to ...
Marco Frag Delle Monache's user avatar
0 votes
0 answers
136 views

Debian 10 Odoo 17 apt install odoo

I'm trying to install Odoo 17 on Debian 10. However, its giving me invalid syntax. File "/usr/lib/python3/dist-packages/odoo/tools/sql.py", line 65 def __new__(cls, code: (str | SQL) = ...
Aabishkar Shrestha's user avatar
0 votes
0 answers
151 views

Issue YOLO giving Illegal instruction (core dumped) on Jetson Nano

I have a jetson nano and I have Ubuntu 18.04 installed running JetPack 4.6. I am trying to run a object detection program from a camera on it. I had a bit of a funky installation process: I installed ...
Yash Jain's user avatar
0 votes
1 answer
80 views

How do I clear the cache without restarting my terminal?

I'm currently working on the POD supercomputer at UT Austin. Tech support for the supercomputer couldn't help me. There's a specific version of Python (3.9) I want to use in my Anaconda environment, ...
himinam's user avatar
0 votes
1 answer
139 views

Is it possible to directly execute a python package like a script (without "python -m ...")?

For single-file scripts, I can always execute them directly, at least on linux, by setting executable permissions on the script and adding a shebang (#! /bin/python) at the top of the file. Is an ...
mo FEAR's user avatar
  • 192
2 votes
1 answer
214 views

Kill process on broken pipe from within a bash script

Consider the code: printf '%s\n' 1 2 3 4 5 | head -n 2 which has the output: 1 2 My understanding is that when the head process breaks the pipe after reading the two first lines then the printf ...
fuumind's user avatar
  • 441
0 votes
0 answers
103 views

Write output of multiple python scripts to single file

I used to have only one python script, of which the output would be directed to a log file. It works like this, I have it in the autostart, using crontab. @reboot /bin/sleep 30; sudo /usr/bin/python3 -...
Dahlin's user avatar
  • 1
0 votes
0 answers
53 views

Scheduling wine exe using cron job raises error

I have been trying to schedule an exe file which runs an underlying python script. When I run it manually (wine sample.exe) on Debian Linux, it runs as expected, however when I run it using cron, it ...
AbhiGupta's user avatar
  • 101
0 votes
0 answers
126 views

python: relocation error - GLIBC/libc; hardware issue?

Python suddenly does not start anymore: python: relocation error: python: symbol nl_l`nginfo, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference OS is CentOS7, Python3.10 in ...
user236012's user avatar
  • 2,235
0 votes
1 answer
118 views

Failing to install cvxpy.py on Ubuntu 22.04.3 LTS, on Zynq UltraScale+ MPSoC based SOM ARM Cortex-A53 4 core processor

I was barely able after much effort to get this to install 9 or so months ago, now it doesn't install on the same platform with a new update/upgrade. Here's the software version info: ubuntu@BDv4-...
Charlie's user avatar
  • 11
0 votes
0 answers
36 views

tmux not starting a python script from cron

I am having issues with cron (Debian bullseye - Raspberry Pi 4) not starting a tmux session from a bash script I gave it to run on @reboot. Here is the problematic fragment of my bash script: ...
Kuba0040's user avatar
1 vote
0 answers
56 views

Cant get Python program to work as service

I am trying to run a rather simple python program on startup and making it restart by itself. Python program working fine from terminal. Service just gives me a failed Message. sudo systemctl status ...
Sebastian Bätz's user avatar
0 votes
0 answers
28 views

Unable to run the command cuckoo -d after installing the cuckoo

ERROR I got is: [cuckoo] CRITICAL: CuckooCriticalError: Unable to bind ResultServer on 192.168.56.1:2042 [Errno 99] Cannot assign requested address. This usually happens when you start Cuckoo without ...
Kontham Sushamma anirveda's user avatar
0 votes
0 answers
41 views

DHCP server can not receive my client in virtual interface

I'm writing a DHCP server and my own client using socket in Python3. My client: def client(self): print("DHCP client is starting...\n") dest = ('<broadcast>', ...
anhbe58's user avatar
1 vote
1 answer
66 views

Failing to install PyPi package gdown via py2dsp

On Debian-like/apt-based distributions, instead of installing Python packaged system-wide with pip install --system, we use APT packages. Here: Install a Python package on Debian/Devuan when apt has ...
einpoklum's user avatar
  • 9,585

1
2 3 4 5
47