Skip to main content

Questions tagged [python3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

Systemd fails to restart a Python script with exit(0)

I have a working python script and systemd service script. But somehow it is not working the way I wanted it. The python script prints time every 5s but stops with exit(0) at first second of a minute. ...
Mainland's user avatar
  • 105
0 votes
0 answers
146 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
2 answers
37 views

Unmet dependancies for python3-samba packages on debian 11 (osmc)

I'm trying to upgrade python3-samba from 2:4.13.13+dfsg-1~deb11u5 armhf to 2:4.13.13+dfsg-1~deb11u6 armhf, yet, when trying to do so I'm getting the following error : The following packages have ...
EVANGELOS KASOTIS's user avatar
0 votes
1 answer
9 views

mapping between PCAN_USBBUSX to /dev/pcanusbX

I have Ubuntu server (22.04.2 LTS) with multiple PCAN devices connected, CAN driver info: $ modinfo pcan filename: /lib/modules/6.5.0-26-generic/misc/pcan.ko license: GPL version: ...
Rami Hassan's user avatar
2 votes
1 answer
141 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
34 views

Folding@Home FAHControl won't launch (Python3 error)

The Folding@Home control program named FAHControl (downloaded from here) won't launch with this Python error: $ FAHControl Traceback (most recent call last): File "/usr/bin/FAHControl", ...
Vlastimil Burián's user avatar
0 votes
1 answer
86 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,643
0 votes
1 answer
40 views

GPU RTX 3090 keeps of going into ERR after some usage

I have been struggling with some issue with a GPU I have on my machine. Currently the GPU works fine for some training work. But it goes into ERR when I type nvidia-smi. What happens then is that I ...
luchino_prince's user avatar
0 votes
1 answer
106 views

How to use eyeD3 for abcde since pep 668

How can I use eyeD3 in Debian 12 with abcde since pep 668? I am trying to use abcde with output set to mp3 set in .abcde.conf. abcde does not find eyeD3, so I try to install. However, pip3/pip tell me ...
Stefan Bollmann's user avatar
0 votes
1 answer
639 views

pip install command fails

Q: how do I fix this pip install issue? I tried to install some libs with pip3 install pinecone-client openai tiktoken langchain and this happened: $ pip3 install pinecone-client openai tiktoken ...
yen's user avatar
  • 137
0 votes
0 answers
76 views

"dpkg: error processing archive" when trying to install python3-samba

I'm still early in my understanding of Linux and computers in general. I have a Raspberry Pi 3, and I'm trying to install python3-samba, and I've encountered some errors that I'm not too sure about ...
Yeah Nah's user avatar
0 votes
0 answers
124 views

Why can't I install tensorflow in fedora 39? Also can't change the python version globally

I am unable to change the python version globally on my fedora 39.so. every time I try to install tensorflow,it shows either couldn't find a version that satisfies the requirement or while ...
Soumyojit Porey's user avatar
0 votes
1 answer
642 views

Installing Python 3.9 on RHEL 7 Using Ansible 2.9.27

I need to install Python 3.9 on RHEL 7 system ( about 10 servers in each environment ) and then update / install Ansible 2.11 on the system. This is in preparation to upgrade Confluent version on ...
adbdkb's user avatar
  • 103
6 votes
4 answers
10k views

If I have two versions of python3 installed on my machine (ie: 3.11.2 and 3.12), how do I set the default version to use when running python scripts?

I installed the earlier version (3.11.2) normally using apt package manager and the later version (3.12) manually from source. When I execute python scripts like so: ./python_script.py The script ...
siralbert's user avatar
  • 117
0 votes
0 answers
29 views

Python IDE (Visual Studio Code and PyCharm) Issues with "gi" Library

I'm having a specific problem with two Python IDEs, Visual Studio Code and PyCharm, which I hope to get some guidance on. The problem is related to the "gi" library. I'm running Python on ...
Umikali's user avatar
0 votes
1 answer
149 views

Broke Linux Mint 21.2 Victoria accidentally

I am a new Linux user, switched from windows to linux just 2 days ago(like I made linux my main OS, removed windows completely). As I am a new user, I didn't have any snapshots of my system. I was ...
bose's user avatar
  • 1
0 votes
0 answers
53 views

Prevent loosing sudo privileges when I exit out of python virtual enviroment

I have a Linux VM moderated by my companies IT team which I have sudo access on. I've discovered that if I enter, then exit, python virtual environment I will lose sudo permission, getting the ...
dsollen's user avatar
  • 794
0 votes
1 answer
3k views

Install additional Python on OpenSUSE (without breaking existing Pythons)

Situation Our company has an internal Server OpenSUSE Leap 15.5 Python 3.6(.15) Python 2.7(.18) see details for more information Task As Python 3.6 is already EOL we want to install a newer Python (...
hardmooth's user avatar
  • 101
0 votes
2 answers
849 views

Modules installed with pip don't work after Bookworm upgrade

I recently upgraded to Debian Bookworm from Bullseye. I am aware that installation of python packages requires a different method as compared to pip install <package>. Therefore, I install new ...
vrgovinda's user avatar
  • 279
0 votes
1 answer
668 views

AIX 7.1 Python3 Installation: Symbol Resolution Issue

I'm trying to install and run Python 3.9 on one of our AIX Operating Systems. I used yum to install Python 3.9. Current OS Level: root@our_AIX_host:/opt/freeware/libexec > oslevel -s 7100-05-11-...
Jesse C.'s user avatar
0 votes
0 answers
237 views

Shell script that uses "while" loop to read file gets stuck

I have a python script which calls a shell script that is on a remote host to be executed which reads a file and does some manipulation as per the text pattern it encounters. I see that while it is ...
user2487274's user avatar
4 votes
1 answer
2k views

apt install python3.11 installs multiple versions of python

I have the below docker file, base image rundeckpro/runner:latest; it has no python installed. After the image is built, there are two versions of python: both python3.10 and python3.11, even though I ...
Sirish Kumar Bethala's user avatar
0 votes
1 answer
693 views

ModuleNotFoundError: No module named 'debpython' [closed]

After some manipulations with updating Python to version 3.9 and using the command "python" to invoke Python 3.9 (update-alternatives), or perhaps something else, I encountered a global ...
echos's user avatar
  • 1
0 votes
0 answers
119 views

Time, Memory Limit and Timeout for Python Command Only

I want to enforce timeout of 5s to python command and at the same time want to measure the execution time for python command (taking into account that python3 command memory limit is 256 MB), what I ...
Albert Einstein's user avatar
0 votes
1 answer
293 views

What can block network connections

I'm trying to create mqtt connection using python. The shortest code to reproduce the problem is import paho.mqtt.client as paho client = paho.Client('myClient') client.username_pw_set('user', '...
Nick's user avatar
  • 3
-1 votes
1 answer
72 views

Python script to get file path: insert the result inside quotes; I get the full path but not quotes

I have a python script which copy the full path of text files opened in gedit: #!/usr/bin/env python3 import subprocess import sys name = subprocess.check_output(["xdotool", "...
Dave's user avatar
  • 1
1 vote
1 answer
546 views

Ubuntu RAM memory dump

I want to take memory dump of ubuntu machine using pyhton script without using LIME, AVML etc tools. I want to use linux inbuilt command like gcore. After creating memory dump of all RAM processes I ...
Praveen Singh's user avatar
0 votes
0 answers
278 views

Why, in my Kali Linux, setting user-installed python3.9.5 to default python3 results in "permission denied: python3" or "python3: command not found"?

BACKGROUND I am using a fresh installation of Kali Linux 2023.1, which has come with Python3.11.1. I need to install MobSF, which requires python3 to correspond to version between python3.8 and ...
Shy's user avatar
  • 599
1 vote
1 answer
138 views

Redirect stderr doesn't show python input

I am running the following command on the terminal: python -c "input('Message')" 2> log but the Message doesn't appear on the screen. Any ideas why this happens?
ado sar's user avatar
  • 133
1 vote
2 answers
2k views

How to pass string from bash to python function

I have a python function which takes a parameter as input and I want to automate and call it through bash. But bash is giving error when i pass variable(string) when calling it a="test" ...
ssuraj's user avatar
  • 13
-1 votes
1 answer
439 views

Read column1 of csv file2 and match with column2 of file1, if text matches then add column1 value from file1 to file2

file1.csv 9,hello-world.com.,A,192.168.0.9 1,hello1-world.com.,A,192.168.0.1 2,hello2-world.com.,A,192.168.0.2 3,hello3-world.com.,A,192.168.0.3 4,hello4-world.com.,A,192.168.0.4 5,hello5-world.com.,A,...
Sha's user avatar
  • 11
2 votes
0 answers
311 views

elegant atomic distributed locking from bash/python?

In order to ensure non-concurrent execution of some code by multiple processes on a single node, I can implement advisory locking based on some atomic command (e.g. ln or mkdir) or I can use flock. ...
Alexis Huxley's user avatar
0 votes
1 answer
100 views

Ubuntu Python PyCharm How to use and install new packages

I am beginner to PyCharm. It is driving me crazy just getting to know what is what and how to use it. I followed the instructions based on this answer. But don't know what or why I am doing. But ...
Mainland's user avatar
  • 105
0 votes
1 answer
720 views

No module called Pandas on the just installed Ubuntu 22.04 and PyCharm

I was with assumption that Ubuntu has all the packages needed for Python. I mean Python3. I installed PyCharm. I just ran this import pandas as pd, got the no module found error. I am surprized. Does ...
Mainland's user avatar
  • 105
1 vote
0 answers
138 views

Configured Pymodbus baudrate different from /dev/ttySX

I am programming a modbus client to read a sensor. I have a code that works correctly on Windows (with multiple baudrates). However, when running it on Linux the baudrate is incorrect. I am using the ...
Ricard Molins's user avatar
0 votes
1 answer
752 views

How do I switch users with their groups groups in Python?

How do I switch to an admin-user account from this python script named root_and_user.py that was run with doas or sudo? #!/usr/bin/env python3 from os import geteuid, seteuid from subprocess import ...
John Smith's user avatar
-1 votes
2 answers
2k views

"KeyError: 'non-free-firmware'" after running apt-get update

Running an update with the following command : apt-get update returns : Hit:1 http://kali.download/kali kali-rolling InRelease Traceback (most recent call last): File "/usr/lib/cnf-update-db&...
cyrus2003's user avatar
19 votes
2 answers
6k views

Difference between installing a package with 'apt' and 'pip'

I have been trying to install a Python module which relies in setuptools, and apparently the module was installed using apt. However, it seems to be the wrong version, so I tried to install it using ...
albertoperdomo2's user avatar
2 votes
1 answer
720 views

Ubuntu-latest GitHub runner cannot Connect to localhost API

What specifically needs to be changed in the below in order for a program running on an Ubuntu-latest GitHub runner to successfully connect to a Twisted web server running on localhost of the same ...
CodeMed's user avatar
  • 5,259
0 votes
1 answer
935 views

Help! I blew up python, pip, and dnf! What should I do!

I bought a book about cyber security in Python, and the author uses python version 3.9. I'll get to dnf in a minute. I use Fedora Linux 37 and the default linux is linux 3.11. I set up a virtual ...
Bryan Zimmer's user avatar
0 votes
1 answer
27 views

python + check value in key in long dictionary

we have the following API that get results in to res , and res is type of dictionary res = api_req.ambari_request("/api/v1/clusters/HDP/host_components?HostRoles/component_name=NAMENODE&...
yael's user avatar
  • 13.4k
1 vote
0 answers
294 views

How can I resolve this pip issue?

I am trying to use pip to install Flask on Ubuntu. However, I am getting the following error: user_1@dell-vostro:~$ sudo -H pip3 install --upgrade pip [sudo] password for user_1: Collecting pip ...
user366312's user avatar
0 votes
0 answers
174 views

accidentally removed pip from RHEL 8.7, now system not working

OS: RHEL 8.7 I had an issue with python. Was trying to resolve it and accidentally removed pip with the command yum remove python3-pip. Tried this method https://access.redhat.com/solutions/64069 It ...
Taimur Falak's user avatar
0 votes
1 answer
42 views

Problem with logic in python script [closed]

#!/usr/bin/env python3 # tarchiver.py # Purpose: Creates a tar archive of a directory # # USAGE: ./tarchiver.py # # Author: # Date January 15th 2023 import os correct_answer = 'yes' correct_answer2 = ...
Kieran Kelly's user avatar
0 votes
0 answers
192 views

Find the peak frequency in Khz of audio file using sox or python for mp3 flac and wav files

I wanted to batch analyze audio files for peak frequencies using python or SoX Above spectrogram are created using sox I wanted to extract peak frequency like in image 1: 20Khz
Arjun's user avatar
  • 1
0 votes
1 answer
1k views

adding ansible_python_interpreter to task with expect module fails to get command with become_user

I'm writing a task for CentOS7 inventory in which have to go through prompt dialogues, which I think is best candidate for andible's expect module. - name: setup some command become: yes ...
Sollosa's user avatar
  • 1,951
2 votes
0 answers
313 views

Why is it possible to run files with permissions 600 from Python's subprocess.run()? [closed]

a.out is a simple C program that prints "hello world" and has permissions 600: -rw------- 1 jim jim 16K Jan 9 12:23 a.out and so understably, when I try to run it, ./a.out, I get bash: ./...
John Smith's user avatar
2 votes
1 answer
502 views

Is it safe to install Python 3 in CentOS Linux 7? [duplicate]

I just realised that the default Python version in CentOS Linux 7 is 2.7.5. I want to use Python 3 in CentOS. I'm not willing to install Anaconda as I'm running the OS on a VM (limited RAM and storage)...
Random Person's user avatar
0 votes
0 answers
318 views

python rpm module not available in python3

I know python2 have a module named "rpm" that help in manipulating rpm databases, as suggested in https://stackoverflow.com/a/51258124/20223973. I see that module is not available in python3....
Harpreet's user avatar
1 vote
1 answer
865 views

need a help to find python 3.7 rpm for RHEL 8.4

We need a Python 3.7 rpm for RHEL 8.4, I am not able to find this on the official python website. Please share the link or redirect where I get this rpm for download. We need this rpm as the CDSW 1.10....
sriny's user avatar
  • 11

1
2 3 4 5
8