python

how to pip install globally on ubuntu

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 # Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/christopher/.modular/pkg/packages.modular.com_mojo # Downloads complete, …

Total answers: 1

Two-way pipe in bash?

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 effect something like this, (excuse my terrible ascii diagram): |->-binary …

Total answers: 1

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

How to install winpdb (the python gui debugger) in 22.04? Has winpdb been removed from the repository in Ubuntu 22.04? Asked By: CatMan || Source winpdb-reborn is a port of the discontinued Winpdb to wxPython 4 / Python 3. To install winpdb-reborn in Ubuntu 22.04 open the terminal and type: sudo apt update sudo apt …

Total answers: 1

Ubuntu clock jumps

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 because making it run a simple Python app, I’ve noticed the timestamp on the print statements are not in chronological order. …

Total answers: 1

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

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 its location is: ~/.local/bin/jupyter-notebook I run …

Total answers: 1

How to `import FreeCAD` in CLI (python)

How to `import FreeCAD` in CLI (python) How can I import FreeCAD from the python console? I’m trying to write a script that can manipulate a given FreeCAD file, but I can’t even get FreeCAD imported into the python console on a system where FreeCAD is installed. user@disp7637:~$ sudo dpkg -l | grep -i freecad …

Total answers: 1

Importing python packages installed with pipx

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, obviously.) I tried $ sudo apt install python3-panflute, but there is …

Total answers: 3

pip disappeared after system upgrade

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: /usr/local/bin/pip: cannot execute: required file not found With sudo: sudo …

Total answers: 3

Adding a newline above PS1 that survives prepending

Adding a newline above PS1 that survives prepending In OBSD ksh, I had a PS1 which prepended a blank line: PS1="n[u@h] wn$" The problem with this was that pyenv prepends the name of a virtual environment when that environment is activated. Here is the relevant bit of the pyenv activation script: PS1="(porcupine) ${PS1:-}" This eats …

Total answers: 2

How to install missing Python modules für QGIS on Manjaro?

How to install missing Python modules für QGIS on Manjaro? I installed QGIS via pamac UI just to find it complaining about two missing Python modules (osgeo, jinja2) needed for some of it’s plugins. My first thought was to install them via pip, but pip refused to do that: $ pip install osgeo error: externally-managed-environment …

Total answers: 1

Is it safe to slicing byte directly to split a big file?

Is it safe to slicing byte directly to split a big file? In my case, the big file is tar.gz, I have myBigFile.tar.gz with size 52GB, I splitted it with chunk size 2GB therefore I have 27 parts file. Here is the code I program from scratch: from time import sleep from glob import glob …

Total answers: 1

Random Segmentation Faults and Python Errors – Ubuntu 22.04 LTS

Random Segmentation Faults and Python Errors – Ubuntu 22.04 LTS I’m experiencing random segmentation faults and python errors I can’t explain on one of my Ubuntu servers. I have been unable to reproduce these faults on any other server or on my development computer. I’m trying to figure out if this is software related (external …

Total answers: 2

Self build executable can only be executed via context menu "run as a program"

Self build executable can only be executed via context menu "run as a program" I am using Ubuntu 22.04.2 LTS I have created an executable using pyinstaller and copied it to the desktop. The problem is that it does not open when double-clicked. However, if you open the desktop as a folder, it will double-click …

Total answers: 1

Install Python3.10 on Ubuntu 23.04

Install Python3.10 on Ubuntu 23.04 I’ve tried to install python3.10 alongside with native python3.11, on Ubuntu 23.04, but looks like it’s not available. mika@system:~$ sudo apt update && sudo apt install python3.10 Hit:1 http://ru.archive.ubuntu.com/ubuntu lunar InRelease Get:2 http://ru.archive.ubuntu.com/ubuntu lunar-updates InRelease [109 kB] Hit:3 https://repo.yandex.ru/yandex-browser/deb stable InRelease Get:4 http://ru.archive.ubuntu.com/ubuntu lunar-backports InRelease [99.8 kB] Get:5 http://security.ubuntu.com/ubuntu lunar-security …

Total answers: 3

How can I launch a script in a terminal window from a service

How can I launch a script in a terminal window from a service I have two scripts which together allow me to receive and answer phone calls over serial. The first is what I want to run as a service in the background it checks if there is a RING signal and if there is …

Total answers: 1

Why is apt so dependent on individual Python versions?

Why is apt so dependent on individual Python versions? We get a lot of questions here about people messing with Python versions and ruining their systems, most noticeably that apt fails to function properly. I am aware that many Ubuntu packages require specific versions of Python to function properly. My question is: what makes a …

Total answers: 1

Installing python3.10 on Ubuntu23.04, alongside with python3.11 causes apt crash

Installing python3.10 on Ubuntu23.04, alongside with python3.11 causes apt crash I need to use python3.10 on Ubuntu23.04. I’ve tried to install python3.10 on Ubuntu23.04, alongside with python3.11. And, it looks like it has been installed. But, python3.10-venv didn’t. Than I’ve tried to switch versions and try install python3.10-venv again, working under python3.10, and looks like …

Total answers: 1