2022 Developer Survey is open! Take survey.

Questions tagged [python3]

The tag has no usage guidance.

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

Is there a possibility to build an ISO that can work like a VyOS ISO? [closed]

I am currently working on an "Ubuntu Build" project, and my goal for this project is to build an Ubuntu image that can work the same way as a VyOS OS. So my Ubuntu OS that Ii will build will ...
user avatar
0 votes
0 answers
14 views

Custom Qtile Widget Output Rendering out of Position on Bar

I have a Qtile wm setup on a vanilla Arch install. As my laptop is old, I want to monitor the fan speed, so I created this simple widget: widget.GenPollText(update_interval=1, func=lambda: subprocess....
user avatar
0 votes
0 answers
11 views

Problems getting gr-osmosdr-git to import the correct version of libgnuradio-runtime

I usually don't ask questions because I find if you search enough you can find the answer, but this one has me stumped. I am using Arch linux and was trying to upgrade from the pacman version to ...
user avatar
0 votes
0 answers
32 views

Passing each line of a text file to a python script and displaying the result

I am new to programming. I usually know enough to search for an answer, but this time I am struggling. I started PicoCTF yesterday. My problem comes from overthinking a solution to the following ...
user avatar
1 vote
2 answers
397 views

POP!_OS - Python3-repolib Error on Upgrade

POP!OS_22.04 TL;DR Ran into a weird error with a specific package python3-repolibon Lenovo Laptop. This also happened this morning on my partner's iMac device after she attempted to upgrade to 22.04. ...
user avatar
  • 11
0 votes
0 answers
19 views

How does one install a python3 library in yocto/opkg?

Openembedded opkg packages for python contain pyc files. I looked at python3-dbus, and I do not see a post-install step. All python related files except the SO files are in /usr/lib/python3.8/site-...
user avatar
  • 153
1 vote
1 answer
46 views

Python not able to see environment variable in RHEL

The following line of code is throwing an environment variable was not found error in a RHEL8 virtual machine running in Azure: sourceKeys = os.environ.get("MY_ENV_VAR") However, when we ...
user avatar
  • 5,074
2 votes
3 answers
118 views

Add zeros in front of a number

I have a file that looks like this and was computed with Python: 1.00000100e+07 1.00000000e+04 1.11000111e+08 1.11000000e+05 Now, I would like to obtain something like this: 010000010 ...
user avatar
  • 69
0 votes
0 answers
16 views

Celery beat service showing inactive (dead) in python3

here i am using celery version 5.1.2 on Ubuntu 16.04 with python version 3.7 and Django version 3.0 here i am unable to schedule tasks and i couldn't understand why its showing inactive(dead) here are ...
user avatar
  • 1
1 vote
1 answer
144 views

How to fix broken apt-get in Ubuntu?

I think I may have broken something with python because I previously tried to update to python3, linked it to /usr/bin/python (which I now realize is the wrong thing to do) don't have the commands ...
user avatar
0 votes
0 answers
95 views

Bash: echo command into tty

I've a service written in Python that can receive commands and does things, here is how it is built: print("\nWelcome!\n") for line in sys.stdin: cmd=line.rstrip() ...
user avatar
  • 701
-3 votes
1 answer
49 views

What is BusyBox?

Just wondering what BusyBox is used for and if I can use it for my project. I have seen the Philips Hue Bridge runs BusyBox and I would like to use it on a relatively small, but powerful controller, ...
user avatar
0 votes
0 answers
22 views

How Do You Debug a Script in the %pre section of a kickstart file

Background: I am trying to run this script in the %pre section of a kickstart file on a VM during a 'text' install: import os,sys,gi gi.require_version("Gtk", "3.0") from gi....
user avatar
  • 299
0 votes
2 answers
58 views

Install Yum/Dnf in a Virtualenv

I've created a Virtualenv (with python3.6) and want to install yum/dnf package in that environment. Is there any way to do that? As import dnf or import yum giving me error in that environment -> ...
user avatar
  • 13
0 votes
1 answer
140 views

Systemd: service.tor started too quickly

I'm using tor service for my script but I get this error: The job identifier is 17084 and the job result is failed. Şub 26 03:12:11 Ugroon systemd[1]: tor.service: Start request repeated too quickly. ...
user avatar
  • 1
0 votes
1 answer
73 views

.desktop File not Working Properly

I'm trying to create a .desktop file for a python script (for the Electrum Bitcoin wallet). If I navigate to the folder where the file is saved and run it (python3 /home/username/.local/bin/electrum), ...
user avatar
1 vote
0 answers
866 views

Change the Python default version in Ubuntu

I have installed python 3.10 on my Ubuntu. Now I have there two versions: 3.8 and 3.10. I would like to set Python 3.10 as a default. I followed the advice here: Change the Python3 default version in ...
user avatar
  • 111
0 votes
1 answer
310 views

Unable to locate and use manual installed Python

I installed latest Python 3.10 using this command: sudo apt install python3.10 But unable to use it. When I am running the same command, getting this Reading package lists... Done Building dependency ...
user avatar
1 vote
0 answers
152 views

Close tmux Session After Script Ends

The remote Python script is executed by a local script using ssh so this is not an interactive session. The tmux session is only useful while the script runs and want it to end after the script is ...
user avatar
  • 11
1 vote
2 answers
152 views

Autokey - Focus App Window If Running, Launch App If Not

I'm trying to obtain the processID of pcmanfm like this: pgrep -f "pcmanfm" When pcmanfm is not running, the command above returns nothing (as I expect). However, when I run the command ...
user avatar
  • 4,313
0 votes
0 answers
193 views

While trying to convert my python project to exe on Kali, the following dependencies error is popping up

I'm trying to convert my python project to exe on Kali, but the following dependencies error is popping up. Command pyinstaller --onefile -w "Emp_system.py" ...
user avatar
0 votes
1 answer
101 views

Unable to use my mouse with automation applications like xdotool

So, I just installed Ubuntu as a dual boot system with windows 10 on my PC. I installed xdotool on it and proceeded to use it. I tried "xdotool mousemove 0 0" but nothing happened. My mouse ...
user avatar
0 votes
0 answers
38 views

Python Pip not working anymore after installing platformio as plugin in VS Code

I'm very confused about how this happend and how this is all intertwined. I've installed platformio with Visual Studio Code, pip doesn't work anymore. Whenever I use pip as a normal user, I get this ...
user avatar
  • 10.3k
1 vote
2 answers
425 views

Unable to run scripts as sudo with the www-data user in Debian

I am setting up a captive portal on a Raspberry Pi (latest distro CLI) where my web application will change NFTables rules based on who is logged in. I have a LEMP stack set up; with Laravel 8 as the ...
user avatar
  • 13
0 votes
0 answers
127 views

dpkg: error processing /var/cache/apt/archives/python3-distutils_3.9.9-2_all.deb: error creating hard link './usr/lib/python3.9/distutils/README'

I want to install python3-distutils on my Kali Linux. But when I type the command sudo apt install python3-distutils, it gives the following error: dpkg: error processing archive /var/cache/apt/...
user avatar
0 votes
0 answers
30 views

Python Ray not starting properly

I am starting ray on my ubuntu by using this command: ray start --head --port=6379 All fine, ray runtime started. But when I check the raylet.out file in logs. It states something like this: Export ...
user avatar
0 votes
1 answer
83 views

On RHEL8 how can I use `alternatives` to choose an already listed version as the used version

On a RHEL 8.3 system I have two python3 versions installed and they show up as the version when I list alterantives' versions: $ alternatives --display python3 /usr/bin/python3.6 - priority 1000000 ...
user avatar
  • 315
0 votes
3 answers
91 views

Read section of a file

I have a file with the following structure: 4168 Targus 1010 Wireless Compact Laser Mouse 4242 USB Design by Example 4201 Buttons and Lights HID device 4220 Echo 1 Camera ...
user avatar
  • 13.5k
0 votes
0 answers
19 views

Can I force Conda to use system packages when available?

I am looking to tidy up the build and runtime environment requirements for a scientific software package that has been worked on by grad students over the last 10 years and now has a conda environment ...
user avatar
0 votes
0 answers
40 views

Trying to connect to Remote DB2 database from Linux

I am trying to connect to a remote DB2 database from Python which is installed in the Linux system. Below are the details : Have installed the Cdata driver and configured the odbc.ini file in root as ...
user avatar
-1 votes
2 answers
38 views

How can i only include the whole number and two decimal points in my output

Code is functioning correctly although I need it to be reduced to only two decimal points for example 38374.96 not 38374.967777777 #!/usr/bin/python3 amount = float(input("Enter a starting value:...
user avatar
1 vote
1 answer
9k views

How to downgrade python version in Ubuntu 20.04?

I need to change my python version from 3.8 to 3.6 ? How can I achieve this in Ubuntu 20.04. I tried pyenv, but when I try to use pyenv like pyenv global 3.6.0 then I do python3 and I have still 3.8 ...
user avatar
0 votes
2 answers
160 views

I messed up trying to set python3 as default on Linux mint

Okay, so I did a quick Google search on how to set python3 as default. I came across this code: echo "alias python='python3'" >> .bashrc source .bashrc Typed it into the terminal and ...
user avatar
0 votes
0 answers
298 views

Unable to connect to Jupyter notebook server (Error 404) from Pyenv virtual environment

OS: 5.14.14-arch1-1 GNU/Linux x86_64 Pkgs: jupyter4.6.3, jupyter-notebook6.4.4, pyenv2.2.0 ] My setup consists in launching jupyter from a pyenv virtual environment in directory /path/to/...
user avatar
  • 2,229
0 votes
1 answer
117 views

How to install different versions of python on centOS 8?

I have python3.6 installed on CentOS Linux release 8.3 [fnord@fnord fnord]$ ls -ls /usr/bin/python* 0 lrwxrwxrwx 1 root root 9 Aug 31 2020 /usr/bin/python2 -> python2.7 12 -rwxr-xr-x 1 root ...
user avatar
2 votes
3 answers
169 views

Cannot Schedule Audio Volume Change with Cron (tried direct in cron, python, etc...)

I posted this in Raspberry Pi, but was told that it was better suited in a general linux or programming area. So I figured I'd ask here now... I am putting together a kiosk that should play video. I'm ...
user avatar
1 vote
0 answers
598 views

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" on arch linux

I'am currently trying to get some images outputted after running this code: import cv2 as cv import matplotlib.pyplot as plt img = cv.imread('Photos/cat.jpg') cv.imshow('cat', img) plt.imshow(img) ...
user avatar
  • 21
1 vote
1 answer
634 views

Pip breaks when switch to Python3.7.9 using update-alternatives on Debian

I am on Debian 11 which comes with python3.9. But I don't need it, I need python3.7. So, I installed pythonn3.7.9 and updated the alternatives. The problem is that when I switch the python version to ...
user avatar
-1 votes
1 answer
251 views

Script n curl POSTs from n lines of txt file & conditionally save output for HTTP request response "200 OK"

Given this cURL "POST" request: $ curl -i -s -k -X $'POST' \ -H $'Host: api.host.it' \ -H $'Content-Length: 205' \ -H $'Sec-Ch-Ua: \"Chromium\";v=\"93\", \" Not;A ...
user avatar
0 votes
1 answer
104 views

meld won't start on Cygwin: Complains about the dbus library

I'm trying to get meld to run on Cygwin 64 (just updated - September 2021), on Windows 10. Some relevant package versions: meld: 3.18.0-1 python3: 3.8.6-1 python36: 3.6.13-2 python2: 2.7.18-4 I'm ...
user avatar
  • 7,249
0 votes
2 answers
297 views

meld won't start on Cygwin: No module named 'meld'

I'm using Cygwin 64 on Windows 10; just updated. Some relevant package versions: meld: 3.18.0-1 python3: 3.8.6-1 python2: 2.7.18-4 I'm also using MobaXTerm's X server (and it works - I can run ...
user avatar
  • 7,249
-1 votes
2 answers
348 views

I can't install pip and other essentials

When I try to install pip using apt by this command: sudo apt install python-pip it replies: Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable ...
user avatar
0 votes
2 answers
292 views

tar fails on symlinks when called as python subprocess

After upgrading my debian from buster to bullseye, my yocto build process fails in do_package: Function failed: perform_packagecopy with hundereds of messages like tar: ./dir/linkfile: Cannot change ...
user avatar
  • 11.2k
2 votes
2 answers
78 views

zsh: interpret date in .zsh_history file

I have copied .zsh_history file from another session, and I want to inspect it. Normally, if I was inspecting my standard ~/.zsh_history file, I would just use the zsh built-in command history, where ...
user avatar
0 votes
0 answers
298 views

How to restore python3 installations to default on Ubuntu

I'm using Ubuntu 21.04. I had deleted /usr/bin/python3 and /usr/lib/python3/ because some packages were giving errors with the binary file. I meant to reinstall python3 to a fresh state, but I didn't ...
user avatar
0 votes
0 answers
34 views

python_history -nnn.tmp files littering home directory

Python 3.9.6 on Arch and 3.9.5 on Ubuntu, same behavior. My home directory is littered with many python_history-nnn.tmp (eg. python_history-95757.tmp) most of which are empty. I like the main ...
user avatar
1 vote
1 answer
111 views

How can I improve this Python / Xonsh script (converted from bash)?

I'm starting to learn xonsh and Python. I want to use Python mainly for shell scripting and I want to replace many existing small to medium bash scripts. I started with the bash script given below (...
user avatar
  • 15.4k
0 votes
2 answers
773 views

"python: command not found" on Oracle Linux 8

I have previous had no problem building a mirror server with Oracle Linux 7. I have followed the same steps registering the server, adding subscriptions. When I later run ./uln-yum-mirror script I ...
user avatar
0 votes
0 answers
58 views

Can you extract a pypy3 rpm from snap?

I have centos 7.6 at work and would like to install pypy3. For policy reasons outside my control they won't do this unless they can find an rpm to install. https://snapcraft.io/install/pypy3/centos ...
user avatar
  • 323
0 votes
0 answers
24 views

Locking Gnome3 from pydbus doesn't return

Trying to lock the screen from python3 script, it works, but the script doesn't exit. What should I change? pydbus.SessionBus().get("org.gnome.ScreenSaver","/org/gnome/ScreenSaver")...
user avatar
  • 21

1
2 3 4 5
7