Questions tagged [python3]
The python3 tag has no summary.
410 questions
0
votes
1
answer
269
views
Python>3.9 install on Ubuntu 20.04 focal
deadsnakes recently removed support for Ubuntu 20.04: https://github.com/deadsnakes/py3.11/commit/54c42edda82a91620e5c26b5e27eeda1527e2cff
So, currently, trying to install any version of python newer ...
0
votes
1
answer
70
views
Binwalk error, debian 12
Debian GNU/Linux 12 (bookworm), 6.1.0-40-amd64,
Python 3.11.2
I tried run binwalk, but it show error:
~$ binwalk
Traceback (most recent call last):
File "/usr/lib/python3.11/importlib/metadata/...
0
votes
0
answers
6
views
NetCDF4 created with Xarray does contain unexpected dimensions
I have a NetCDF question:
I was creating a NetCDF4_classic file via Python's xarray package:
import xarray as xr
ds = xr.Dataset(
data_vars={
"Data1": (("time"...
2
votes
1
answer
158
views
I cannot get pyautogui to install
I would like to use a Python script to create a video from Stellarium. I have tried several different methods, but so far none have worked. A promising approach is to spawn Stellarium and then use ...
0
votes
0
answers
52
views
org.freedesktop.IBus interface not found in the system after installing ibus and daemon start
My system is Kali 2022. I am new to linux and trying to interact with IBus using a python script. I have done the following things:
Installed ibus using sudo apt install ibus
Started ibus-daemon ...
0
votes
0
answers
41
views
Is the are a single site-packages directory for multiple versions of python3 in rpm-based distros?
I am working on creating deb/rpm packages for a little project of mine.
I have already created the packages for a few rpm-based and deb-based distros. In deb distros one python file is being setup in /...
0
votes
0
answers
74
views
php script: shell_exec('nohup /usr/bin/python3 -u /location/script.py > /location/script.log & : Script terminates after 5 seconds but should not
I have a PHP Script with the command
shell_exec('nohup /usr/bin/python3 -u /location/script.py > /location/script.log &');
This PHP Script is called via ajax, the script runs, logfile is ...
0
votes
0
answers
189
views
Installing python 3.12 and pip on Ubuntu 22
Im on Ubnutu 22 and trying to run some python code I developed on my mac which runs python 3.12, Ubuntu 22 comes with python 3.10.x but I cant use that version. Im also using the idle IDE and pip as ...
0
votes
1
answer
698
views
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 ...
0
votes
0
answers
115
views
Does homebrew and Xcode python share the same environment?
I am trying to flesh-out a mental model of Python environments for my MacBook (MacOS Ventura 12.x). I am aware of venv (virtual environments) and that it serves to prevent updates from changing the ...
-1
votes
1
answer
104
views
How do I install python on cpanel on linux
I am trying to deploy a linux executable from Delphi.
The host has cpanel
I have installed PAServer
However I get this error about symlink target directory does not exist
Unable to start LLDB kernel: ...
0
votes
0
answers
139
views
Python ModuleNotFoundError for installed module
Getting ModuleNotFoundError for recently installed module. There are a lot of similar topics in google, however tips from there (use python3 -m pip instead of pip or use virtual env python3 -m venv) ...
0
votes
2
answers
6k
views
Errno 13 Permission denied when pip upgrade or pip install
I have set up my virtual ennvironment and i'm trying to install the package but i keep on running into this error :
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/...
0
votes
1
answer
69
views
Cant't create a Venv on Debian - No error message [closed]
I had my files transferred on another OS (from RetroPi to Debian) and I wanted to relaunch my Venv. I started by deleting the .venv folder I had (which was not that easy as some files were protected ...
2
votes
1
answer
1k
views
PATH on Mac not working for Python
I am trying to run a Python program from my command line on my Mac. (in this case: python3 Hello.py).
For the life of me, I can’t get it to consider the PATH where the program is located. This is the ...
0
votes
2
answers
290
views
/usr/lib/python3.12 was accidentally deleted, is there way to recover?
In order to recover I tried apt autoremove, tried to reinstall python3, libpython3-stdlib, libpython3-minimal with apt and dpkg, tried to remove python files from /var/lib/dpkg/info. Neither of that ...
0
votes
1
answer
139
views
meld won't run on Cygwin: AttributeError: module 'gi' has no attribute 'require_version
I'm trying to run meld on Cygwin, after having installed it, and circumvented the "no module named 'meld'" issue by forcing it to use Python 3.6. Now, I get:
$ meld
Traceback (most recent ...
0
votes
1
answer
264
views
Open second terminal window in virtual environment
In Debian bookworm I opened a terminal window and then created and activated a virtual python environment with
python3 -m venv [path]
and activate. This all worked fine.
Now I want to open a second ...
0
votes
1
answer
92
views
Where to store shareable application data for home user?
I'm working on a project that uses ags (with gtk-layer-shell) to provide a top bar similar to waybar. I'm also building a gui app with pyGtk that'll be used to change that bar's appearance and ...
1
vote
0
answers
884
views
Device or resource busy on AWS Lambda
Fresh deployed Python FastAPI application to AWS Lambda.
Python application uses ldap3 module to authorize user signing in against Windows Active directory (hosted on AWS Directory Services). However ...
0
votes
1
answer
104
views
How to keep pinned versions in requirements.txt in sync with Debian stable?
Situation:
Requirements for a Python package in requirements.txt
Dependency versions are pinned (good practice)
Dependency versions in requirements.txt should be kept in sync with equivalent Python ...
0
votes
1
answer
1k
views
Missing /usr/bin/python3
I'm missing the python3 binary in /usr/bin/.
which python3 outputs /home/d4rkc10ud/anaconda3/bin/python3
sudo apt install python3 outputs python3 is already the newest version (3.12.3-0ubuntu1).
sudo ...
0
votes
1
answer
152
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. ...
0
votes
0
answers
891
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(...
0
votes
2
answers
268
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 ...
0
votes
1
answer
64
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: ...
2
votes
1
answer
539
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 ...
0
votes
1
answer
86
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", ...
0
votes
1
answer
460
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 ...
0
votes
1
answer
140
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 ...
0
votes
1
answer
754
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 ...
1
vote
1
answer
2k
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 ...
0
votes
0
answers
290
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 ...
0
votes
0
answers
151
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 ...
0
votes
1
answer
1k
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 ...
6
votes
4
answers
24k
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 ...
0
votes
1
answer
214
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 ...
2
votes
1
answer
6k
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 (...
0
votes
2
answers
1k
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 ...
0
votes
1
answer
1k
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-...
0
votes
0
answers
319
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 ...
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 ...
0
votes
1
answer
1k
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 ...
0
votes
0
answers
195
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 ...
0
votes
1
answer
573
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', '...
-1
votes
1
answer
108
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", "...
1
vote
1
answer
857
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 ...
0
votes
0
answers
358
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 ...
1
vote
1
answer
261
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?
1
vote
2
answers
4k
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"
...