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
0 votes
1 answer
12k views

Postgres pg_hba.conf Configuration

I'm trying to develop a python application using Postgres. Unfortunately everytime I do a db.session.commit() I get this as an error: OperationalError: (OperationalError) fe_sendauth: no password ...
0 votes
1 answer
531 views

Stuck upgrading to ubuntu 20.04

I've been trying to upgrade from Ubuntu 20.04 to 22.04. I'm trying to do this by running: sudo do-release-upgrade I'm met with the following: Traceback (most recent call last): File "/usr/bin/...
1 vote
1 answer
4k views

ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

I'm on Ubuntu 18.10 Whilst trying to get this project from GitHub to work: https://github.com/naokishibuya/car-behavioral-cloning After running "python drive.py model.h5" I'm getting following error:...
10 votes
4 answers
2k views

How to make a brochure from a pdf file in ubuntu?

Say that I have a 16-page pdf file, A4 sized. I have A4 paper and printer. I want to shrink it to halves, and print them on 4 sheets of paper, double side, fold them in halves, and staple it in the ...
0 votes
0 answers
25 views

PyCharm says "invalid python interpreter" about the venv I used (after Ubuntu upgrade)

After upgrading Ubuntu, PyCharm says this: (How can I make that venv work on newer Ubuntu? - I'd rather keep all installed packages in that venv)
1 vote
2 answers
8k views

Running systemctl in Python script

I'm trying to get the status of a few systemd services in Python, but I keep getting the error FileNotFoundError: [Errno 2] No such file or directory: 'systemctl show -p ActiveState --value abc' I'm ...
1 vote
0 answers
26 views

CUDA in Docker image breaks and require sudo apt upgrade

Question Why sudo apt upgrade on the host OS is required to make CUDA work in Docker container? The problem does not occur without Docker, but occurs only when a Docker image is recreated. Environment ...
3 votes
2 answers
5k views

Ubuntu 16.04: can't open the terminal after trying to install Python

Yesterday I installed Ubuntu, but now I cannot open Terminal... I click on the Terminal icon and it doesn't start, and ctrl+alt+t isn't working either. I've read different ways to fix this (and none ...
2 votes
1 answer
6k views

OpenShot video editor doesn't open

I installed OpenShot video editor by using sudo apt install openshot from the official repository, then I tried to open it by using openshot-qt command and it camed errrors, here's the output: ...
-4 votes
0 answers
32 views

Hi im trying to update my kali linux but im getting this error [closed]

im using $sudo apt-get update and $sudo apt-get upgrade but im getting this weird error. ──(kali㉿kali)-[~] └─$ sudo apt-get upgrade Reading package lists... Done Building ...
-3 votes
0 answers
30 views

I can not configure or uninstall python3.8 minimal , because of this i stacked here.please give solution asap

$ sudo apt-get install --reinstall python3 Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and ...
2 votes
1 answer
6k views

python3 is broken on Ubuntu 20.04 and I am unable to fix it

I somehow messed up the python3 environment in my Ubuntu 20.04 (upgraded from 19.10). I do not know how this exactly happened, but after rebooting I am not able to start the gnome-terminal anymore. ...
2 votes
1 answer
7k views

Pyinstaller in ubuntu16.04 :Python library not found: libpython3.6mu.so.1.0, libpython3.6m.so.1.0, libpython3.6.so.1.0

I want to use pyinstaller make a bundle in ubuntu 16.04. the python env is created by conda which python=3.6.8. When i run pyinstaller, below error occour. I know ubuntu16.04 has python3.5 why python3....
0 votes
1 answer
9k views

Error at startup "No module named 'six'"

I am running Ubuntu 17.04 and for some time now, every time I start my machine I get an error about the package-data-downloader that crashed because of No module named 'six'. See this screenshot: I ...
0 votes
0 answers
397 views

My ubuntu server broke after following a tutorial to upgrade python frm 3.6 to 3.8 [duplicate]

I followed this tutorial to upgrade python: https://tech.serhatteker.com/post/2019-12/upgrade-python38-on-ubuntu/ Then I ran sudo apt update && sudo apt upgrade but the system refused with the ...
2 votes
1 answer
5k views

python installed in another directory

I am using ubuntu 16.04. Ubuntu 16.04 comes with python2 and python3.5 and I wanted python3.7 so I followed some instructions from a site and installed python3.7 manually by compiling its files and ...
0 votes
0 answers
19 views

Shell script doesn't recognize Python even after setting its path [duplicate]

I'm having trouble calling Python code from a shell script on Ubuntu. First of all, I confirm that Python is installed: username@Ubuntu22:~/Documents/Script$ python Python 3.10.12 (main, Nov 20 2023, ...
6 votes
1 answer
14k views

Run python script in virtual environment on startup

I would like to start a python script from a virtual environment on startup. I have searched the whole forum and other sources but have not been able to make it work. The script should run at the ...
0 votes
0 answers
22 views

Pip install freeze inside python Docker image

Pip install freeze inside python Docker image. However on other Linux machine it launches right away. => [internal] load build definition from Dockerfile ...
0 votes
0 answers
32 views

Installed nvidia through file runner, nvcc is on my system but not properly configured

I installed version 11.8 of CUDA on my system through the runfile: https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&...
0 votes
0 answers
262 views

No module named 'llama_index.vector_stores' - installation of OpenDevin on WSL Ubuntu

I try to install and start OpenDevin on WSL Ubuntu (WSL 2). Ok, I follow this guide but I can't fix this error so the backend doesn't start ModuleNotFoundError: No module named 'llama_index....
-2 votes
0 answers
59 views

How to deal with "one of the commands exit with non-zero exit code" [closed]

I've been confused about the error message: one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode! Snakefile parameters: Shell command: This is the definition ...
1 vote
2 answers
6k views

Can't install Python 3.8.13 using pyenv and Homebrew

I'm a new Linux learner. When I try to install python via pyenv, this error appears: OS: Ubuntu 22.04 kev@kev-Modern-15-A5M:~$ pyenv install 3.8.13 Downloading Python-3.8.13.tar.xz... -> https://...
4 votes
3 answers
2k views

How to determine all python-nautilus extensions in use?

I need to provide an application developer with a list of all other python-nautilus extensions I have installed/running (I am trying to provide information on this issue). What is the easiest way to ...
0 votes
0 answers
81 views

Why am I getting an Illegal instruction (core dumped) error when attempting to run conpot in a vm?

Attempts at running conpot is giving me a illegal instruction (core dumped) error. I am running an Ubuntu 22.04.4 server and I am attempting to run a conpot on it. It was working this morning and I ...
0 votes
1 answer
62 views

how to write cronjob

I tried to setup cronjob for python script erpnext_sync.py which is in located at /home/user_name/frappe-bench/biometric-attendance-sync-tool $ crontab -l * * * * * /usr/bin/python3 -c 'from ...
-1 votes
1 answer
6k views

How to Set Up Nginx Permission In /root Directory?

I Want To Deploy Flask Application On Ubuntu Server With Nginx And Gunicorn. I followed This Tutorial. 1).So Every Thing Is Good Up To Gunicorn Configuration. 2). I Creates /etc/systemd/system/...
0 votes
0 answers
77 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 ...
0 votes
0 answers
51 views

Kubuntu python environment pip installation too slow

I recently switched to Kubuntu from windows. When I create a python virtual environment and try installing packages using pip, the download and installation process take too long. But the ...
0 votes
0 answers
172 views

Launching ProtonVPN On Ubuntu 22.04 Error - AttributeError: 'NoneType' object has no attribute 'connect'

I am facing this issue using ProtonVPN on Ubuntu, it was working well a few days ago. I have also tried to reinstall it several times but nothing seems to work. Please if anyone got this before, here'...
0 votes
1 answer
91 views

Correcting #!/bin/env python shebang issue

I recently installed DOCK3.7 on my workstation running Ubuntu 20.04. However, I encountered an issue where the python scripts called upon could not be located, despite specifying the correct path and ...
0 votes
1 answer
52 views

What languages installed with APT on Ubuntu come with graphical features straight out of the box?

Just wondering what programming languages I can install straight from the APT that come with built in graphics functions on Ubuntu. I know Java can but I don't know of anything else and information on ...
0 votes
1 answer
5k views

How to use opencv-python on WSL2 Ubuntu20.04

I have just installed a Ubuntu-20.04 on WSL2. And I installed a miniconda env with python 3.7, and then I installed opencv-python by "conda install opencv". But when I try the simplest cv2....
2 votes
1 answer
6k views

How to make an environment variable available for a python program using os.environ module?

I'm just new in this site and new to all the GNU/Linux environment, I'm trying to access to an environment variable from a python program that I wrote in PyCharm, I created it but I the the variable ...
0 votes
1 answer
9k views

Broken Python ImportError: No module named _sysconfigdata_nd

After installation, I installed python 3.5 by using conda and then removing conda. Before the removal, I was able to access the pip and etc. On the terminal, any python command results on this as ...
0 votes
1 answer
4k views

What to do for the error "RuntimeError: Python 3.5 or later is required"?

Error: RuntimeError: Python 3.5 or later is required Question: How to resolve error of runtime while installing jupyter using pip3? Different versions of python installed on system: $ python python ...
1 vote
1 answer
9k views

Spyder Anaconda - select Python interpreter

I have installed Anaconda (x64 Linux) and I am running its Python 3. When I type which python, I get /home/hinckelbc/anaconda3/bin/python Now to display the version, I type python -V, and I get ...
0 votes
0 answers
650 views

i have a problem installing anything in ubuntu [duplicate]

3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.2) ... /var/lib/dpkg/info/python3-apt.postinst: 6: /...
80 votes
5 answers
92k views

How to use a python virtualenv with sudo?

I am trying to make a python environment separate from the system one (using virtualenv) in a directory which is not under /home, because I need to use it to build other software that has to be ...
1 vote
0 answers
21 views

No jupyterhub access to GPU

Platform: x86_64, Ubuntu 22.04.4 LTS, 5.15.0-101-generic, jupyterhub 2.0.0+ds1-2 I've installed jupyterhub from the official Ubuntu software repositories (package jupyterhub). This works and I can ...
0 votes
0 answers
19 views

How to configure a folder for custom Python App installed through CPanel?

I installed my python script using Cpanel feature "Setup Python App". I run my script in virtual environment created by CPanel: /home4/apmcapit/virtualenv/apps/myapp/3.9/bin/python /home4/...
2 votes
1 answer
332 views

PvRecorder throws error when run in systemd service

I am trying to run PvRecorder on my Raspberry Pi 4 with Ubuntu 23.04 in a python script, and it works fine when run on its own, but when I run it using a systemd service, it throws errors. This is my ...
2 votes
1 answer
6k views

sh: 1: python: not found when execute python script from php

I'm tring to execute a python script call from php with the command below: $output = shell_exec('python /var/www/html/sna/server/userManagement.py '. $user.' '. $pass .' \''.$action.'\' 2>&1'); ...
1 vote
1 answer
7k views

airmon-ng / airodump-ng is not detecting any wireless devices

I am using ubuntu in vmware and for using airmon-ng, I already download it from terminal. But when I run it it says root@DESKTOP-SIVJTCS:/home/show# airmon-ng PHY Interface Driver ...
2 votes
0 answers
843 views

Error : Sub-process /usr/bin/dpkg returned an error code (1) [duplicate]

Ran the following command: sudo apt-get install --reinstall python3 Output: Reading package lists... Done Building dependency tree Reading state information... Done Reinstallation ...
3 votes
2 answers
2k views

Getting an error when running apt update: ModuleNotFoundError: No module named 'apt_pkg'

When I run apt update on a Ubuntu 18.04.6 LTS, which is a server my company use for hosting Netbox, I get the following issue: $ sudo apt update Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic ...
1 vote
2 answers
3k views

Errors while processing: python3-apt,usb-creator,apport,python-apt [duplicate]

I'm not an advanced user of Ubuntu, and I have a really big issue. When I run: sudo apt-get update && sudo apt-get upgrade I get the following output: Hit:1 http://pl.archive.ubuntu.com/...
4 votes
1 answer
26k views

How can i resolve dpkg error after uninstalling python3? [duplicate]

I tried to uninstall python3.5 from my Ubuntu 16.04 by using the command sudo apt-get remove python3 within the directory /usr/bin. When I tried to install it again, using sudo apt-get install python3,...
1 vote
1 answer
4k views

How to get screen output from a background python program

I'm running a home heating system monitor on a BeagleBoard xM (arm7) using Ubuntu 16.04.2 and Python 2.7.12. My Python program auto runs on boot via a cron job. The board runs headless. I access it ...
2 votes
1 answer
1k views

How to install Python 3.12 on Ubuntu 23.10?

I did several wrong things for my first day on Ubuntu when trying to code with Python, so I just reinstalled it. Can anyone tell me the best way to install Python here? I am using Ubuntu 20.04, and I ...

1
2 3 4 5
104