Questions tagged [python]
Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
2,343 questions
0
votes
0
answers
348
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 ...
0
votes
1
answer
5k
views
failed to get the Python codec of the filesystem encoding after Ubuntu upgrade
After upgrading to Ubuntu 23.04, my Python installation does not work anymore.
Running Poetry gives the following :
➜ ~ poetry
Could not find platform independent libraries <prefix>
Could not ...
1
vote
1
answer
248
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
0
answers
476
views
How to keep form data in NGINX redirect?
I have a flask server and nginx handling the incoming connections. When I call a specific method of the flask api using https it works fine, the problem is when nginx redirects from http to https and ...
0
votes
0
answers
330
views
Limit the total CPU usage for the entire system?
I'm running a Chrome instance on a NAT VPS. Being a NAT VPS it has some restrictions such not not allowing a 15min average load greater than 1. However, just starting and going to a few webpages ...
1
vote
0
answers
280
views
Unable to import tensorflow_datasets ("not a mach-o file")
I have just set up my Mac M1 environment for tensorflow, and it seems to be running fine, the issue I'm having is setting up tensorflow_datasets. I installed this by running this in my conda env:
...
2
votes
1
answer
166
views
Broken Pip (Gentoo)
I've been trying to figure out how to set up a Matrix server with Synapse. It was working fine, but somehow it broke. Was following a few different guides so I'm not sure exactly how it broke. I'm not ...
1
vote
2
answers
13k
views
How to fix "PermissionError: [Errno 1] Operation not permitted" when running python commands?
I have installed python 3.11 with command
sudo apt-get install python3.11. I am trying to create a new virtual environment for my project in a folder on a USB drive.
But when I actually run command ...
0
votes
1
answer
563
views
Where can I find the Python executable that PyCharm uses in its venv?
I'm using PyCharm 2022.3.2 (Community Edition) under Linux Mint 20.3. I created a new project and selected "New environment using Virtualenv" as an option. PyCharm shows "Python 3.10&...
1
vote
1
answer
797
views
Simulating Keystrokes to a Telnet process
On my Linux system I have opened a Telnet session. On the other tab I am running a Python script and giving commands to the Telnet session using mkfifo file redirection. But I am not able to simulate ...
0
votes
1
answer
271
views
Installing pyasn to Kali produces error "python 2.7 breaks python-pyasn1 and is installed"
sudo dpkg -i python-pyasn1_0.4.2-3build1_all.deb
I try to depackage this deb, yet I am on kali (debian) I get error
python 2.7 breaks python-pyasn1 and is installed
dpkg: error processing package ...
1
vote
0
answers
233
views
Compiling with Boost on Manjaro with Python 3.10
I'm trying to use the Cornell-MOE software. When trying to install it using python setup.py install, I run into the following error:
[...]
running install_scripts
Could not find env var MOE_CMAKE_PATH ...
0
votes
1
answer
1k
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 ...
3
votes
1
answer
3k
views
Why does escaping double quotes from Python's run (with shell=True) is different than in Bash?
I need to produce JSON configuration files
with echo and tee called from my Python script.
By trial-and-error I've found out that I have to use single quotes.
Yet I don't understand all the behaviour ...
0
votes
0
answers
349
views
Can I install and run pyenv-virtualenv without installing 'python-openssl' and 'tk-dev'
System MX linux 21.3 on Macbook Pro 13 inch mid 2012. I want to install python 2 and python 2 packages alongside python 3. Therefore I proceeded to install and run pyenv-virtualenv. When I try to ...
2
votes
1
answer
166
views
docker logs err:"+ sudo -E kolla_set_configs sudo: unknown uid 42401: who are you?" in openstack container
Multinodes(3 nodes) openstack cluster deploy by kolla-ansible, two nodes(2nd and 3rd nodes) are working well, the one node(1st_node) have some containers always Restarting with the error logs, e.g. ...
0
votes
1
answer
498
views
Cannot upgrade MariaDB Connector/C on Parrot OS
Please note very new to ParrotOS + Python.
Error output when trying pip3 install mariadb :
MariaDB Connector/Python requires MariaDB Connector/C >= 3.3.1, found version 3.1.18
I cannot seem to ...
2
votes
1
answer
907
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 ...
0
votes
0
answers
792
views
Terminal closes itself when running many python processes
I was trying to run multiple machine learning experiments simultaneously to save time. My OS is Fedora 36, and I use emacs. To automate the experiment I used runs.py
import subprocess
subprocess.run(&...
0
votes
1
answer
604
views
Can not run Python on Wine as a root user
I have installed Python 3.10.8 on Wine 7. For downloading modules using pip, I need wine to access the internet. But wine can not access the internet without using sudo. If I run
wine ping google.com, ...
2
votes
0
answers
375
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: ./...
0
votes
1
answer
120
views
Pronsole utility throws several errors when I push gcode commands to Tronxy x5sa 3D printer from an Ubuntu Server 20.04
I've recently gotten my Tronxy 3D printer to connect to my linux machine running Ubuntu Server 20.04 via a USB serial connection. I am hoping to use Pronsole, (a utility in the printrun tool suite) to ...
0
votes
0
answers
1k
views
Yum is broken after deleting /lib64/python3.6 on CentOS 8
I accidentally removed /lib64/python3.6 which was installed with yum previously. Yum is now broken and i cant install packages. I am running on CentOS8. I installed python3.10 from source. I have ...
1
vote
1
answer
2k
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....
0
votes
0
answers
355
views
Iterating over mount points on startup with python script executed as a service with systemd
I want to iterate over mounting points with a Python script on a system startup.
The script works fine on the fully booted system (even when called as sudo systemctl start launcher.service) but fails ...