Skip to main content

Questions tagged [python]

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

0votes
0answers
42views

My system doesn't record last log in for users

I wrote a code to display last login date for every user on Ubuntu to help admins define which users are inactive, the problem is it displays every users last logins dates since 1970 (the output looks ...
sparrow _70's user avatar
1vote
0answers
35views

How can I reliably block GUI-initiated system shutdown when systemd-inhibit only delays terminal shutdown commands?

I'm developing a desktop application using PySide6 for Linux, and I need to prevent or delay system shutdowns that are initiated from the graphical interface. I know that running systemd-inhibit --...
Nirav Jangale's user avatar
0votes
0answers
30views

What are the rules behind finding executables in shebang statements? [duplicate]

I want to create a Docker image that has the Python3 runtime, a Python script of my creation, update-alternatives configured to run python3 when python is invoked, and I want to make the Python script ...
StoneThrow's user avatar
0votes
1answer
39views

How to install DNF packages using Yum when Python packages are in a different location

We have a RHEL 8.10 server, and the default location for Python packages is under /usr/lib/python3.6/site-packages/. This includes, of course, the DNF packages located at /usr/lib/python3.6/site-...
yael's user avatar
  • 13.9k
2votes
1answer
103views

Executable not found when executed with cron but works fine when running from CLI

Got this cron, which run some scrapy code * * * * * cd /var/projects/project-1/scrappers && python3 runner.py It return this error on the logs Continue with error: [Errno 2] No such file or ...
Ricardo Albear's user avatar
1vote
0answers
32views

Xorg not starting when invoked from Python

I'm creating a display manager (dm) in python, which waits to Xorg to start in order to run the GUI. Python (omitted unnecessary code like widgets and classes and functions) import os (more imports ...
rustymanito's user avatar
1vote
3answers
121views

How to find the python command in a shell script?

Let's suppose that you have a super python 2&3 one-liner that you need to use in a shell script. On system A the python command works, but on system B you have to use python3, on system C you need ...
Fravadona's user avatar
0votes
1answer
57views

Captive Portal w/ nginx, hostapd, nftables, dnsmasq

I'm trying to make captive portal with nginx, hostapd, nftables, dnsmasq and python-flask. I have two main problems I'm not getting a popup on Android, but am on Iphone/OSX. I'm not sure how to ...
user3666672's user avatar
0votes
1answer
187views

How to upgrade numpy? | ImportError: Matplotlib requires numpy>=1.23; you have 1.21.5

I need to run matplotlib. However, it requires an up-to-date version of numpy. How can I manually update my numpy installation? $ pip install numpy --upgrade Defaulting to user installation because ...
user2231142's user avatar
0votes
1answer
42views

How to open line in $EDITOR while in python shell?

As a somewhat new user, I recently discovered the trick of opening the current terminal line in $EDITOR, using the hotkey C-x C-e. This has changed my life, and has made writing loops and such much ...
supersquires's user avatar
0votes
0answers
53views

Is it safe to invoke `apt` from within a conda environment?

I have a Python script which manages upgrading the system by invoking apt with different arguments via the subprocess module. It relies on the python_toolkit and docker libraries, so these need to be ...
Daniel F's user avatar
0votes
0answers
21views

Running py2debi for ffsubsync, I get: "No such file or directory: 'requirements.txt'"

I'm trying to follow the advice here: Install a Python package on Debian/Devuan when apt has no package for it and create a Debian/Devuan package for the ffsubsync Python package. All the dependencies ...
einpoklum's user avatar
3votes
2answers
1kviews

Should I keep all Python libraries only in the virtual environment?

I am working on Debian Stable Linux (12.9) and it is otherwise working very well. I am also using Python3 for small data analysis tasks. I have been installing Python3 libraries in virtual ...
rnso's user avatar
  • 323
0votes
0answers
18views

Does Nautilius the file manager customizer allow one to right click and pass into a python function the file right clicked as argument without error?

I am working on creating a way to right click on an .eml file, right click, and have python pull two pieces of data from it and paste them into a new xlsx file and auto open the xlsx file. I would try ...
Coo's user avatar
  • 101
0votes
1answer
87views

Using PyInstaller with Wine: Path Issue Between Linux and Wine Environment

I have this linux distro: Distributor ID: Kali Description: Kali GNU/Linux Rolling Release: 2024.4 Codename: kali-rolling I have wine installed correctly wine-9.0 and I installed a ...
Yilmaz's user avatar

153050per page
close