Questions tagged [python-2.7]

Python 2.7 is a version of the Python programming language released in 2010. Use this tag for questions about using Python 2.7 in Ubuntu.

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

gem5 compiling problems after adding python2.7 to my ubuntu

I had python3.8 originally, and compiled gem5 (X86 and ARM) successfully. then I added python2.7 to run some models. now I got below errors that I have not before when trying to compile gem5 using: ...
user avatar
1 vote
1 answer
229 views

Install python-mysqldb for Python 2.7 in Ubuntu 20.04 - unmet dependencies

I am trying to install python-mysqldb for Python 2.7 in Ubuntu 20.04: $ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main' $ sudo apt update $ sudo apt install -y python-...
user avatar
  • 2,333
0 votes
0 answers
22 views

Disable .pythonrc only in Python 2

Thanks to this assignment: export PYTHONSTARTUP=~/.pythonrc I can start an initialization script as soon as I run Python, a bit like the .bashrc file. The problem is that this works on both Python2 ...
user avatar
4 votes
2 answers
169 views

Running a Python2 program with Python3?

EDIT: Updates below, the scenery seems to have changed significantly. I have Ubuntu 20.04, and have installed Python 3.10 manually. There's python 2 in the system already, and that's what I get if I ...
user avatar
0 votes
1 answer
106 views

How to remove Python version shown in zsh terminal

How can I remove this "via python v2.7.17" from my terminal? Sorry, I'm new to Ubuntu and I can't find any way to remove this from my terminal.
user avatar
0 votes
0 answers
37 views

set up environment for python2.7, but "pip install ." gave error of the package requires a different python: 2.7.18 not in '>=3.7,<4.0'

(with Windows11 and currently using Ubuntu 18.04 LTS) https://github.com/ding-lab/CharGer/blob/7d7d2911b89261fa5dceea6395a5d188a82757f2/README.md I followed the instruction and created environment as ...
user avatar
  • 1
-1 votes
1 answer
816 views

How to change the version of python from 3.8 to 2.7

I need to use Python 2.7 in order to use PneumoCaT as it only runs with Python 2.7 not higher versions. I am trying to set my Python version from 3.8 to 2.7 in Ubuntu, but I can't do it. This is the ...
user avatar
0 votes
0 answers
24 views

Utilizing Python 2.7 features in VMware

Good afternoon, I am working on a program install in VMware15 Ubuntu (20.04). The installation instructions are causing me issues as a entry-level user, so I wanted to see if anyone could make sense ...
user avatar
0 votes
0 answers
226 views

i can't install tensorflow. (no matching distribution found)

i am sorry to ask such question, but being new to coding, i can't solve this problem even with googling full 2 days. so here it goes. I'm trying to run a demo posted at github using ubuntu for ...
user avatar
  • 1
0 votes
0 answers
134 views

Ubuntu 20.04 gnome tweaks not working with python 3.9

I recently upgraded my default python version from 2.7 to 3.9. I updated and upgraded, everything working fine except the gnome-tweak is not working or not apprearing. Any kind of information would be ...
user avatar
2 votes
1 answer
1k views

"No package 'pygtk-2.0' found" on Ubuntu 20.04 even after installing python-gtk2 from archives

I am trying to install blueman which seems to have pygtk-2.0 as a dependency. When doing ./configure, it stops here: configure: error: Package requirements (pygtk-2.0 >= 2.12.0) were not met: No ...
user avatar
  • 21
0 votes
1 answer
260 views

I can't use python pip to download any tools and I don't know why

here's a picture of the error I get and the python installations i have, I tried to delete python7.2 and it seems like it's not working.. any help is highly appreciated
user avatar
  • 23
2 votes
0 answers
381 views

ykman installation

I tried installing ykman in ubuntu-18.04(WSL) using below commands, sudo apt-add-repository ppa:yubico/stable sudo apt update sudo apt install yubikey-manager when I try to find the version using: ...
user avatar
1 vote
1 answer
2k views

instaling matplotlib for python 2.7 in Ubuntu 20.04

I have to run some all programs written in python2.7. They use library "matplotlib". In the repository of Ubuntu 20.04 there is no candidate for installing it and matplotlib for python3 is ...
user avatar
0 votes
3 answers
310 views

how do I remove python 2.7.16

I need to remove python 2.7.16 but even If I use: sudo apt-get purge python2.7 doing python --version still prints Python 2.7.16 I need to have python 3.6+. plz help
user avatar
0 votes
1 answer
115 views

How to safely remove python2.7-dev and libpython2.7-dev from ubuntu 18.04?

Since a long time ago I had stopped development with python 2.7. As python 2 has been deprecated how can I safely remove python2.7-dev and libpython2.7-dev from my system. Can I simply do sudo apt ...
user avatar
  • 2,747
0 votes
1 answer
252 views

Uninstalling Python 2.7.12 on ubuntu 18.04 ended with broken packages [duplicate]

I made a hoorible mistake because I removed pyth 2.7 of my ubuntu machine 18.04 as I wanted to keep only python3 but unfortunately there were some componenents who were installed using pip from the ...
user avatar
0 votes
1 answer
3k views

neither python 3 nor python 2 works well on ubuntu 18.04 with repo?

I'm on ubuntu 18.04 and I'm trying to init this repo : # repo init -u https://github.com/anbox/platform_manifests.git -b anbox since I'm using this version of python : # python Python 3.6.9 (default, ...
user avatar
  • 349
2 votes
2 answers
3k views

“pip install MySQL-python” not working on Ubuntu 20.04

When I try to install MySQL-python using pip for Python 2.7, it is not working anymore on Ubuntu 20.04 - on Ubuntu 18.04 it still works... Any idea of how I could make this run on Ubuntu 20.04? I know ...
user avatar
  • 31
1 vote
2 answers
12k views

pip 2.7 error `sys.stderr.write(f"ERROR: {exc}")`

I'm using docker image of Ubuntu 16.04 ros:kinect container. My problem is that when I upgraded pip 2.7 (python version Python 2.7.12) via sudo pip install pip --upgrade, it started to show the ...
user avatar
  • 205
1 vote
1 answer
239 views

I have several python versions installed and I want to remove the packages installed under them [duplicate]

Using pip I am only able to uninstall for a few versions. I am fairly new to this, so please let me know if there is some way of deleting it. I am currently using Ubuntu 20.04. I had previously ...
user avatar
  • 11
1 vote
1 answer
697 views

error updating python 2.7.12 on xenial [duplicate]

I did the following but still fail to update the python2 to the latest build sudo apt update apt list --upgradable Listing... Done libpython2.7/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 ...
user avatar
  • 153
0 votes
0 answers
94 views

how to resovle confusing pip and pip3 in ubuntu?

Using Ubuntu 20.04, I checked my python and pip version which are: python -V: Python 2.7.18 python3 -V: Python 3.8.5 which python /usr/bin/python which python3 /usr/bin/python3 pip -V pip ...
user avatar
  • 1
5 votes
1 answer
4k views

Ubuntu 20.04 - need Python 2 - native Python 2 install vs other options?

I've been using Ubuntu 20.04 for a few months now and things are going well, however recently I ran into 2 legacy applications which I'll need to start supporting that will require Python 2. As best ...
user avatar
  • 1,221
0 votes
1 answer
95 views

Dependencies of python2, e. g. GIMP

After installing in 18.04 (upgraded from 16.04) python3 I removed python2 by sudo apt autoremove python2 sudo apt autoremove python2.7 As I now realized this was stupid. But I don't understand why ...
user avatar
-1 votes
1 answer
600 views

Why is my docker file assuming Python 2.7?

I am working on a pc with ubuntu 20.04.1 LTS My python version is 3.8.5 I am trying to build a docker image with the following Dockerfile FROM ros:kinetic-robot LABEL maintainer="olala7846@gmail....
user avatar
0 votes
1 answer
137 views

I need to execute my python code on raspberry pi 4 automatically, in Every per minute [duplicate]

I entered this command to execute: * * * * * python/home/pi/Desktop/sensor.py >> /var/log/gasdetails.log 2>&1 but it gives an info: Dec 22 21:08:01 raspberrypi CRON[2070]: (CRON) info (...
user avatar
0 votes
1 answer
783 views

Trying to update python3.9 giving errors

What I've done : sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.9 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 sudo update-...
user avatar
  • 311
2 votes
1 answer
8k views

How to create python2.7 virtualenv on Ubuntu 20.04

I want to run an application that uses python2.7 version, but by default python2.7 is not installed. When I tried to use: $ virtualenv -p python2 flaskold It returned: RuntimeError: failed to find ...
user avatar
  • 6,447
0 votes
1 answer
72 views

Pycharm Community Edition isn't detecting my packages

I have tried and tried again to properly install a package for Pycharm. I've used pip for both Python2.7 and Python3, and I've tried to use the tar file. But Pycharm doesn't detect the modules, even ...
user avatar
2 votes
1 answer
5k 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'); ...
user avatar
  • 29
0 votes
0 answers
2k views

How can I solve a "module not found" error when running python scripts?

Preface This is most likely a question which has been asked before but alas, none of those previous have been able to provide a conclusive answer/fix. Actual issue I'm trying to run a script which ...
user avatar
  • 1
0 votes
2 answers
480 views

How to update system python 2.7 to 3.x in Ubuntu 20.x after upgrade

I have an old VM that started out as Ubuntu 16.x then I upgraded it to the 18x series and now 20.x series. I was surprised that python 2.7 was still the system python. I discovered that if you upgrade ...
user avatar
0 votes
0 answers
50 views

Installing python 2 deb packages locally in a single project

I am struggling with cutting off python 2 functionalities from ubuntu 20. I have a project that porting to python 3 may take a lot of time so i have to use ubuntu 18 packages to satisfy its module ...
user avatar
  • 45
0 votes
1 answer
2k views

ModuleNotFoundError: No module named 'pandas' occurs even if pandas is installed on my machine

I am using Ubuntu 16.04. I have python 2.7 and python 3.7 installed on machine. I have installed pandas on my machine. However when I try to import the pandas package it gives ModuleNotFoundError: No ...
user avatar
  • 101
1 vote
1 answer
2k views

Ubuntu 20.04 ImportError: No module named gdal

I am trying to use python2 bindings for gdal on Ubuntu 20.04 LTS, which does not have the python-gdal package in it's repository, to run an old python2 application. I tried to download and install it ...
user avatar
  • 45
3 votes
1 answer
5k views

Ubuntu 20.04 ImportError: No module named gtk.glade

i am trying to launch an old python2 script. On ubuntu 18.04 i installed python-glade2 and it worked, unfortunately ubuntu 20.04 doesn't have it in repositories. Is there a way to get this gtk.glade ...
user avatar
  • 45
5 votes
2 answers
6k views

How to get PyQt5 for Python2 on Ubuntu 20.04

I have a critical PyQt5 application which is still in the migration to Python3 phases. K/Ubuntu 20.04 has removed the required packaging to install PyQt5 for Python 2.7. I understand the importance ...
user avatar
  • 81
1 vote
1 answer
290 views

How to make python2 find the old python-gtop?

I'd like to install python-gtop from the old python-gtop_2.32.0+dfsg-1_amd64.deb but that has a dependency on python (< 2.8) The following packages have unmet dependencies: python-gtop : Depends: ...
user avatar
  • 135
1 vote
1 answer
439 views

Uninstalled python2, but still appears in /usr/bin and in file explorer

I am trying to uninstall Python 2. I have attempted to do this both from my computer's Control Panel and from the Ubuntu command line using sudo apt remove python2. Both of these actions appear to ...
user avatar
1 vote
0 answers
186 views

Ubuntu 18.04-Runtime error- Embedding python to C

I am working on a project which is related to object detection and ocr. I am using Ubuntu 18.04 and python 2.7, yolov3 for object detection and tesseract 5.0.0-alpha-692-g62ea for ocr. I have to embed ...
user avatar
  • 11
1 vote
0 answers
74 views

python38, python3, python 2.7, and python 3.8, a file called "secretstorage" and some serious file differences

I have Xubuntu based on 20.04. A newish install. My security is a VPN and the firewall from the router. I have python2.7, python3(no decimal), and python3.8. python3 is VERY different from the ...
user avatar
4 votes
2 answers
1k views

How to get the terminal to work again? Terminal stopped working after changing default python version

I was trying to make python version 3 as a default version of Ubuntu, I used nano ~/.bashrc and added the first line of this answer. Then It just messed up my terminal. Now when I am clicking on ...
user avatar
  • 211
7 votes
2 answers
22k views

How to remove Python 2 from Ubuntu 20.04?

I've upgraded recently from Ubuntu 18.04 to 20.04. But I can see that Python2 is still the default instead of python 3.8.2. $ python -V Python 2.7.18rc1 $ python3 -V Python 3.8.2 Is it possible ...
user avatar
  • 737
0 votes
1 answer
1k views

pip install pyopenssl object has no attribute 'SSL_ST_INIT'

I've searched this forum for the same issues and none of the fixes worked for me. I have a Ubuntu 18.04 and any python 2.7 modules that need OpenSSL I get an attribute error. Pip install command ...
user avatar
1 vote
1 answer
735 views

How to install gcloud in a Docker container on 19.10?

I have a Docker container as 19.10 as both the host and guest, and I tried to install gcloud: # Add the Cloud SDK distribution URI as a package source RUN echo "deb [signed-by=/usr/share/keyrings/...
user avatar
1 vote
1 answer
2k views

Is there a way to get Blue-Proximity working or an alternative?

I'm looking for a way to use my mobile to automatically unlock my laptop. Blue Proximity seemed like a good answer, but it's clearly been abandoned as a project and I'm having problems with some of ...
user avatar
0 votes
1 answer
155 views

Python command target changed

Older versions of Ubuntu shipped with python 2.7 and python 3.6. But in Ubuntu 20.04 LTS, only python 3.8 is installed. So when python was typed in terminal, python3.8 opened. python, python3 and ...
user avatar
  • 2,125
1 vote
1 answer
3k views

Python3 vs Python 3.8

Ubuntu (older than 20.04 LTS) ships with Python 3 and python 2 both. When python was typed in terminal, python2.7 opens and to open python 3.6, python3 command is needed. However python3.6 also works. ...
user avatar
  • 2,125
0 votes
1 answer
3k views

`pip install pygame` produces `Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vD9diA/pygame/`

What I'm running on OS: Ubuntu Server 18.04.4 Computer: Raspberry Pi 4 Model B pip version (the default installed on 18.04.4 LTS): pip 9.0.1 python version (the default installed on 18.04.4 LTS): ...
user avatar
  • 103

1
2 3 4 5
9