apt

Getting syntax error while using virtualenv package in Ubuntu 16.04

Getting syntax error while using virtualenv package in Ubuntu 16.04 Question: I am running Ubuntu 16.04 in VMware virtual environment. When I try to install virtualenv, I am facing issues. What I did: sudo apt install python3-pip sudo pip3 install virtualenv virtualenv –version The last command is showing this: Traceback (most recent call last): File …

Total answers: 1

apt-get install packages introduces lots of python errors on Ubuntu

apt-get install packages introduces lots of python errors on Ubuntu Question: apt-get install -y my_package Everything works until Setting up my_package… And lots of python errors like the below appeared: Compiling ./ext/python3.9/lib/python3.9/site-packages/setuptools/installer.py … File "./ext/python3.9/lib/python3.9/site-packages/setuptools/installer.py", line 77 raise DistutilsError(str(e)) from e ^ SyntaxError: invalid syntax I suspect it has something to do with python versions …

Total answers: 1

ModuleNotFoundError: No module named 'apt_pkg' installing deadsnakes repository

ModuleNotFoundError: No module named 'apt_pkg' installing deadsnakes repository Question: I want to install Python 3.10 on Ubuntu 18.04 (I’m currently on Python 3.8) from the deadsnakes repository with the following set of commands I found on the internet: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.10 But I got the error sudo: add-apt-repository: …

Total answers: 1

ImportError: libGL.so.1 when running Docker container with OpenCV

ImportError: libGL.so.1 when running Docker container with OpenCV Question: I’m getting the following error when running my docker container: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘libcudart.so.11.0’; dlerror: libcudart.so.11.0: cannot open shared object file: No such fi le or directory 2021-07-01 18:39:36.985933: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU …

Total answers: 2

pip 10 and apt: how to avoid "Cannot uninstall X" errors for distutils packages

pip 10 and apt: how to avoid "Cannot uninstall X" errors for distutils packages Question: I am dealing with a legacy Dockerfile. Here is a very simplified version of what I am dealing with: FROM ubuntu:14.04 RUN apt-get -y update && apt-get -y install python-pip python-numpy # …and many other packages RUN pip install -U …

Total answers: 4

How to restore after accidentally apt-get remove python

How to restore after accidentally apt-get remove python Question: Yeah. I’ve done this. It was stupid. I did not know it’s going to take its dependencies with itself, only wanted to install python 2 and 3 from scratch (because of this problem: https://askubuntu.com/questions/897355/how-to-change-default-idle-for-python). Now, I can still use my terminal, checked these answers: https://askubuntu.com/questions/741265/apt-get-remove-python-150mb-apt-get-install-python-687kb https://askubuntu.com/questions/437644/i-accidentaly-did-sudo-apt-get-remove-python …

Total answers: 7

Debianzing a Python program to get a .deb

Debianzing a Python program to get a .deb Question: Aim To create an installable .deb file (or package). Which when clicked would install the software on a Linux machine and an icon would be put on the GNOME panel. So as to launch this application from there. What I have referred to I referred to …

Total answers: 2

Installing SciPy and NumPy using pip

Installing SciPy and NumPy using pip Question: I’m trying to create required libraries in a package I’m distributing. It requires both the SciPy and NumPy libraries. While developing, I installed both using apt-get install scipy which installed SciPy 0.9.0 and NumPy 1.5.1, and it worked fine. I would like to do the same using pip …

Total answers: 8

How to compare Debian package versions?

How to compare Debian package versions? Question: I looked at python-apt and python-debian, and they don’t seem to have functionality to compare package versions. Do I have to write my own, or is there something I can use? Ideally, it would look something like: >>> v1 = apt.version(“1:1.3.10-0.3”) >>> v2 = apt.version(“1.3.4-1”) >>> v1 > …

Total answers: 4