Questions tagged [python]

Python is an interpreted programming language that is often, but not solely, used as a scripting language. A version of Python is included by default on all Ubuntu distributions.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
28 views

Python disfunctional after upgrading to Ubuntu 22.04

I just upgraded to Ubuntu 22.04 (WSL) and somehow my Python is all messed up. When I load Ubuntu, I get: /usr/bin/env: ‘python3’: No such file or directory /usr/bin/env: ‘python3’: No such file or ...
Barry's user avatar
  • 99
4 votes
2 answers
78 views

How to fix the error of complete removing python from Ubuntu 20.04 [duplicate]

I made a stupid mistake of complete deleting python 3.10 from my laptop with Ubuntu 20.04, when I tried to update it to 22.04 version. After doing this, I can only access tty1 mode (i.e. a black ...
dzhu_man_dzhi's user avatar
0 votes
2 answers
84 views

Fail to open terminal from desktop but not from nautilus

I'm trying to open a terminal from my desktop through the shortcut Ctr+Alt+T, icon or mousse right-bottom "Open in terminal" but it fails (it gets stuck like trying to open and eventually ...
Dani's user avatar
  • 17
-2 votes
0 answers
28 views

How to solve the syntax error while importing reflex in python3.7 [closed]

I installed pip3 using curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" and did pip3 install numpy and pip3 install pandas which work fine and did the same for reflex as ...
Miriam Samson's user avatar
0 votes
0 answers
33 views

(Ubuntu 22.04.3 LTS) Cannot install python3-pip, error message (code 1) appear

I have a problem when trying to install python3-pip on Ubuntu 22.04. I got the Ubuntu from here and run on USB drive. Then as python3/pip is in the universe repository, I enabled the universe ...
exe127's user avatar
  • 1
-1 votes
0 answers
25 views

pycharm launch problem in ubuntu

When run jetbrain pycharm on ubuntu 22.04, get this error: java/lang/NoClassDefFoundError: java/lang/Object this error appears just today and at the same time jetbrain clion can work correctly on the ...
rzshme's user avatar
  • 39
0 votes
0 answers
15 views

No apt_pkg and black screen after installing Python version [duplicate]

I was having some trouble installing things due to a python library not being found. I don't remember exactly, but I may have installed a different python version. Now on start up my screen is black ...
Joe Harrison's user avatar
0 votes
1 answer
79 views

Bash script does not recognize commands (Perl and Python scripts)

I have this script in bash inside which is defined to use perl and python for subprograms that need to analyze my data. Script is executing fine until Step3 and Step4 and crashes with command not ...
Maja Mucko's user avatar
0 votes
1 answer
50 views

Camera Module 3 not working on Ubuntu Raspberry Pi

I have a Raspberry pi 4B with Ubuntu, and I’m trying to use my camera module 3 with python (I’ve tested the code with Raspberry Pi OS, so I know it’s right) using PiCamera and in a virtual environment ...
Flamethrower's user avatar
0 votes
0 answers
29 views

How to restore ubuntu graphics after deleting python?

I'm using Ubuntu 23.04 right now and I've made a similar mistake before Q I was doing something that told me to remove and reinstall python3.11 and I ran this command sudo apt remove python3.11 It was ...
ahmadi's user avatar
  • 1
0 votes
1 answer
63 views

Issue with installing PyQt6 on Ubuntu 22.04

I need to install PyQt6 on a fresh install of Ubuntu 22.04. I use python 3.11.5 via Pyenv and the Poetry package manager. There are no errors during installing or importing, but calling the ...
9sven6's user avatar
  • 101
2 votes
1 answer
32 views

Webcam is not working or accessible on Ubuntu 22.04 when using an SSH or Remote Desktop Connection from another machine

In this Scenario I connect from an Windows 11 to a Ubuntu 22.04 via local network to run some python scripts, one of these scripts needs webcam access. Webcams works fine when connected and used ...
Bo Kristensen's user avatar
1 vote
1 answer
90 views

Considerations when upgrading Ubuntu from 18.04 to 22.04 -- software development POV

I have been using Ubuntu 18.04 LTS for over three years now and have been considering moving to newer LTS versions for some time. However, the thought of working software breaking or requiring changes ...
silent_monk's user avatar
-1 votes
1 answer
66 views

how to pip install globally on ubuntu

Is there a way to create an globally environment or allow pip installation globaly the sofware im trying to install is failing and and i think is trying to pip install somthing modular install mojo # ...
christopher's user avatar
-1 votes
0 answers
74 views

Can't get python script to run as executable file

I've read other answers on this in this forum. I am trying to run this script - I copied it and pasted it here. When I do what other answers say to do I can't get it to work. #!/usr/bin python3 ...
Dora Smith's user avatar
0 votes
0 answers
36 views

pip3 broken on ubuntu for me

i use Ubuntu 20.04 and python3.8. I decided to try to create a virtual environment through python 3 -m venv venv, this happens: python3 -m venv venv Error: Command '['/root/venv/bin/python3', '-Im', '...
mruddoff's user avatar
0 votes
1 answer
35 views

Is python-omniorb package available for Ubuntu22

I am upgrading to Ubuntu 22.04 and need a package python-omniorb which I use under Ubuntu 20.04 but cannot find it for Ubuntu22. I have used the package search but it finds only Ubuntu20. Is it ...
Terry L Anderson's user avatar
0 votes
0 answers
36 views

gnome-screenshot does not work from VS Code debugger, but works fine without debugger

Fresh Ubuntu 22.04.3 LTS installation, VS Code, python 3.10.12. The following python script: tmpFilename = '.screenshot%s.png' % (datetime.datetime.now().strftime('%Y-%m%d_%H-%M-%S-%f')) subprocess....
MiLa's user avatar
  • 1
0 votes
1 answer
29 views

Python error when running incremental duplicity backup to Backblaze B2

Running Ubuntu 22.04.2 LTS on a VPS (Contabo), with Duplicity 0.8.21 and Python 3.10.12, and I am backing up to Backblaze B2. Full backups run fine, but I get Python errors when running an incremental ...
Wamuu's user avatar
  • 1
1 vote
1 answer
138 views

Two-way pipe in bash?

I have a binary who's stdout is being redirected to the stdin of a python script, and I was wondering if there's any way to send the stdout of the python script to the stdin of the binary, to get an ...
SpaghettiMan's user avatar
1 vote
0 answers
124 views

pyenv Python 3.11.5 install fails in Kubuntu 23.04

I'm using zsh and oh-my-zsh. I'm doing ➜ ~ pyenv install 3.11.5 and the output is: Downloading Python-3.11.5.tar.xz... -> https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz Installing ...
sodiumnitrate's user avatar
1 vote
1 answer
46 views

How to install winpdb (the python gui debugger) in 22.04?

Has winpdb been removed from the repository in Ubuntu 22.04?
CatMan's user avatar
  • 1,373
0 votes
0 answers
32 views

Ubuntu clock jumps

I've noticed that since the last update of the Ubuntu kernel (specs are below) the OS clock randomly jumps seconds. I'm using Python 3.10.12 and Ubuntu 22.04.3 LTS 6.2.0-26-GENERIC I've noticed ...
NicoCaldo's user avatar
  • 133
2 votes
0 answers
81 views

Upgrade not working something wrong with python

Hello about two years ago I tried updating python and something went very wrong. I am now trying to update my distro and I am running into a bunch of problems. I don't use this laptop often and I don'...
LawrenceVestor's user avatar
1 vote
1 answer
78 views

How to add a Jupyter Notebook icon to my app menu?

I am working on Jupyter Notebook and I want to see its icon in the Applications menu, but it is not there. I should also mention that I do not have Anaconda, and I installed Jupyter separately. Also ...
Zeus's user avatar
  • 13
0 votes
1 answer
106 views

Add a list to specific lines of a (YAML) text file using python

I have an Ansible module file for NetBox with this content: - name: "Test NetBox modules" connection: local hosts: localhost gather_facts: False tasks: - name: Create device ...
mohammad's user avatar
1 vote
0 answers
37 views

Enable firewall connection for python server from localhost

I want to connect python server from my localhost to Ubuntu, but I get the following error: Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:8000... failed: ...
aintgelic's user avatar
0 votes
0 answers
20 views

"A problem occured when checking for updates"

Ubuntu 23.04 Note that I'm a complete newbie, it's probably something simple but I'm taking lots of time to figure out what to do. So, when I upgraded ubuntu from 22.something, my system started using ...
Kayoshio's user avatar
0 votes
0 answers
95 views

ModuleNotFoundError: No module named 'http.client'

Running Ubuntu Server 22.04, and I get this error when I try to run python scripts that I've been using. The simplest case is literally just: import requests This appears to be happening system-wide, ...
tryna_learn's user avatar
0 votes
0 answers
29 views

find snap app temporary folder programatically

I run python scripts that call system applications to produce some output files. The user can decide to put those file in a temporary folder, for example using tempfile.gettempdir(). However this ...
JuanPi's user avatar
  • 101
0 votes
0 answers
136 views

Is it possible to install python3.9-dev on Ubuntu 22.04?

I've been googling a bit, but not finding anything useful.
Andrew's user avatar
  • 101
0 votes
0 answers
23 views

Failover issue for Redis Sentinel on docker-compose

I want to prepare basic setup for Redis Sentinel on docker. Everything looks fine, replication is working as expected, however, failover doesn't work. In order to test it I created some simple python ...
tstr's user avatar
  • 141
-1 votes
1 answer
27 views

trouble creating python3 -m venv py_envv using windows subsystem linux (using ubantu distribution)

Its my first post in askUbuntu, please bare with my discription. command at PWD : python3 -m venv py_envv after excuting I got an error below The virtual environment was not created successfully ...
JakeCaspian's user avatar
0 votes
0 answers
45 views

Bluez: cannot find Bluetooth device after failed pairing

I am developing a simple app in python that uses bluez and dbus. The app should pair with a Bluetooth device - a raspberry Pi. I failed at pairing once, and now not only am I not able to reproduce the ...
user7216373's user avatar
0 votes
0 answers
105 views

How to run Qt Designer in Ubuntu 22.04?

I am teaching myself PyQt6 using this tutorial. I get the examples running and I want to use Qt Designer. I can install it but in all cases (mentioned below) Qt designer starts and hangs. I have to ...
Arnold's user avatar
  • 215
1 vote
1 answer
121 views

How to auto-restart a Python script sometimes?

I have a long running tool I’ve written. It, unfortunately, isn’t super reliable and sometimes crashes. I’ll call it myscript.py. I run it with a launcher script called launch, which sets some env ...
cocomac's user avatar
  • 3,093
4 votes
3 answers
676 views

Importing python packages installed with pipx

I want to use the panflute package in some Python code, like this: import panflute. I don't want to start a virtual environment every time I run that code, if I can avoid it. (It's a Pandoc filter, ...
twsh's user avatar
  • 187
0 votes
1 answer
272 views

Install PyQt4 on ubuntu 22.04

I am trying to install PyQt4 on ubuntu 22.04, because a specific software need python2 and PyQt4: install python2 sudo apt install python link python2 to python Now, python -v is Python 2.7.18 (...
zhang's user avatar
  • 111
0 votes
0 answers
78 views

How to install InquirerPy on Ubuntu 23.04 Lunar Loobster?

I want to install InquirerPy python library on Ubuntu 23.04, but it isn't in repo. So I tried pip install InquirerPy --break-system-package. It installed, but then, when I wanted to use it, it can't ...
Vioar's user avatar
  • 1
0 votes
0 answers
51 views

Why install ‘black’ rather than ‘python3-black’?

I am using Kubuntu with sway as a window manager, but I don’t think that makes a difference to my problem. I just spent a long time trying to enter sudo apt install python3-black. The answer, it turns ...
Tim Ferguson's user avatar
0 votes
0 answers
27 views

Bugs with mplstereonet and matplotlib

The problem is with the package MPLSTEREONET installable with pip. With matplotlib version 3.4 or less the package works well. With matplotlib 3.5 and above someone could get the message of error ...
Khereddine Attafi's user avatar
0 votes
0 answers
123 views

Installing jaxlib for cuda 11.8

I'm trying to install jax and jaxlib for snerg (https://github.com/google-research/google-research/tree/master/snerg). Unfortunately when I try to install jax and jaxlib for Cuda 11.8 with the ...
m0j1's user avatar
  • 103
0 votes
3 answers
184 views

pip disappeared after system upgrade

I upgraded from 22.10 to 23.04 just now without any problems. However, after the upgrade my pip is not working and I cannot figure out how to make it working again. If i just want to call it: pip bash:...
Gábor Erdős's user avatar
2 votes
0 answers
112 views

Ubuntu server 23.04 netplan cloud-init python error

I've tried to find a solution and an answer myself before but didn't succeed. I recently changed my wi-fi SSID and thus had to reflect that change in my ubuntu server configs. On the raspi 4 ...
verypacific's user avatar
0 votes
0 answers
33 views

OOM kills Python calculation in terminal via remote but not in a ssh

I don’t know why my Python calculation is running when I am using an ssh connection to a Linux machine (Ubuntu). The same calculation doesn’t work when I run it in a terminal via remote connection. ...
Archimedes_91's user avatar
2 votes
1 answer
68 views

Whisper AI throws the error: std::runtime_error

Initially I was able to run Whisper on my Ubuntu 22.04.2 LTS and it worked well. After some: sudo apt-get update sudo apt-get upgrade I faced with the following: ~: whisper --version terminate called ...
eSensitive's user avatar
1 vote
1 answer
501 views

Adding opencpn repository - AttributeError: 'NoneType' object has no attribute 'people'

When I try to add the opencpn repository I get the following error message: sudo add-apt-repository ppa:opencpn/opencpn Traceback (most recent call last): File "/usr/bin/add-apt-repository"...
SPRBRN's user avatar
  • 2,155
1 vote
0 answers
162 views

how do i write a script to activate a conda virtual enviornment?

I have a conda virtual environment where I run code for voice processing. I want to write a script so that I can open a shell in this virtual environment to listen for commands. I can launch the ...
j0h's user avatar
  • 14.6k
0 votes
0 answers
28 views

Unable to install python-gtk2 because of dependensies

(Reading database ... 215530 files and directories currently installed.) Preparing to unpack python-gtk2_2.24.0-5.1ubuntu2_amd64.deb ... Unpacking python-gtk2 (2.24.0-5.1ubuntu2) over (2.24.0-5....
Winston Churchill's user avatar
0 votes
0 answers
11 views

E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (2: No such file or directory) [duplicate]

I am trying to install a python version on linux. But I am getting the following error: E: Archives directory /var/cache/apt/archives/partial is missing. Acquire (2: No such file or directory) Edit: $...
jiho's user avatar
  • 1

1
2 3 4 5
103