Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-2
votes
0answers
28 views

How to get special attribute value in python [duplicate]

d = {'dist': '44', 'ner': 'Seattle'} I wish get only 'Seattle' value
0
votes
0answers
21 views

NPM installation fails due to python dependency error

I try to install the npm package on my Ubuntu 18.04 but it fails. My question is, can I have a python2.7 installation (what I actually seem to have according to whereis python2.7) and what do I have ...
3
votes
1answer
260 views

How to replace a Python 3 installation with Python 2.7

I already have Python 3 installed on the server machine, and I want to replace that with Python 2.7 as the code I have to deploy is complaint with Python 2.7. What command should I run so Python ...
0
votes
0answers
39 views

python upgrade version not be used

I recently upgraded the numpy package in python [root@xxxx ~]# easy_install --upgrade numpy Searching for numpy Reading https://pypi.python.org/simple/numpy/ Best match: numpy 1.15.2 ...
-2
votes
0answers
38 views

nested for loops glob

I'm trying to use a for loop and a nested for loop So what I have is: for f in glob("/Users/Desktop/network5"): for x in glob(f/*): print x break break This doesn't give me any ...
0
votes
1answer
34 views

Python syntax error with awk, sprintf statment (2.7)

I am trying to use one of the shell commands to a python script, but struggling with some syntax error here. The description of the command is from here echo /dev/bus/usb/`udevadm info --name=/dev/...
0
votes
1answer
18 views

Does opencv3 support measurementMatrix attribute for kalman filter?

I am using Ubuntu 16.04, python 2.7.12 and I have installed opencv 2.4.9.1 version. I am trying to run a code for kalman filter and I get the following error: AttributeError: 'cv2.KalmanFilter' ...
0
votes
1answer
120 views

How to install numpy and scipy for python 2.7.12, Ubuntu 16.04?

I tried to install numpy using: pip install numpy It worked, but I got a warning: warnings.warn(warning, RequestsDependencyWarning). Then I tried to install scipy with: python -m pip install --...
1
vote
0answers
53 views

Take pictures automatically from mobile camera and use it as a web cam

I have found a python script which can automatically capture my photo through web cam. My web cam quality is far inferior and I need superior quality photo because I wanna use that for image ...
1
vote
1answer
114 views

Ubuntu 18.04 vim-gtk with python2 support

I need vim-gtk with python2 support on ubutnu 18.04. On Ubuntu 16.04 I used the package vim-gtk-py2 but I don't see an equivalent package on 18.04. Does anyone know of a vim package with python2 ...
0
votes
1answer
37 views

Will it be safe to use python 2.7 on Ubuntu 18.04 after python 2 EOL?

Ubuntu 18.04 will still be supported after 2020, yet python 2.7 will reach its end of life. If a CVE or a bug raises for python 2.7 after 2020, will the Ubuntu package get an official fix (through APT)...
0
votes
1answer
294 views

How do I restore pip after upgrade from ver 9 to ver 18 on Ubuntu 18.04 Desktop Vm?

I started with pip ver 9, and after reading a blog how to upgrade, I ran following which seems to have broken pip: # pip install --upgrade pip This installed pip ver 18 !! Successfully installed ...
0
votes
0answers
31 views

Automatize loggin with Telegram-CLI

I am trying to automatically register for Telegram with Telegram-CLI (https://github.com/vysheng/tg) in two different ways, but without success: 1 - xdotool: When prompts the phone number: xdotool ...
0
votes
1answer
54 views

Unmet dependencies that I actually have

When trying to install python-gtk2, I get the following errors: sudo apt-get install python-gtk2 Reading package lists... Done Building dependency tree Reading state information... Done Some ...
0
votes
1answer
114 views

Graphics plotting provides distorted and unusable plots with Python 2.7 after upgrading to Ubuntu 18.04 [closed]

My Python 2.7 code that I've been running in Ubuntu 16.04 does some simple graphics plotting routines that provide distorted and unusable plots now that I've upgraded to Ubuntu 18.04. I get no error ...
1
vote
1answer
145 views

Cannot use Python apps after Ubuntu 18.04

After updating to Ubuntu 18.04 LTS I can no longer use most Python apps including pip (to install or uninstall). I get the following error in command-line: Traceback (most recent call last): File ...
3
votes
1answer
495 views

Error: could not determine PostgreSQL version from '10.4'

getting error while installing uniq Error message: Downloading https://engci-maven-master.cisco.com/artifactory/api/pypi/apic-em-pypi-group/packages/86/fd/...
3
votes
0answers
327 views

gcloud failed to load: libssl.so.1.0.0: version `OPENSSL_1.0.2' not found

While trying to use gcloud I'm seeing this error: ERROR: gcloud failed to load: /tmp/_MEIKmE9I5/libssl.so.1.0.0: version `OPENSSL_1.0.2' not found (required by /usr/lib/python2.7/lib-dynload/_ssl....
0
votes
1answer
1k views

Python 3 as default Python command [duplicate]

I am using Visual Studio Code for my Python programming and the problem that I am facing is that on terminal when I type the command python, by default Python 2.7 is loaded. So because of this I am ...
1
vote
1answer
3k views

Install Python 2.7.6 in ubuntu 16.04

Hi i am trying to install python2.7.6 on my 16.04 cloud image. Its giving the following on - apt install python=2.7.6 Reading package lists... Done Building dependency tree Reading state information.....
0
votes
1answer
53 views

Unable to uninstall anything or due to Python 2.7 error

I am not able to uninstall any program on Ubuntu due to a Python config error. Some googling led me to do a download and install missing Python packages and then execute: sudo dpkg --configure -a ...
0
votes
1answer
169 views

How to repair a broken apt-btrfs-snapshot in kubuntu 18.04?

After installing Kubuntu 18.04 on a Thinkpad W520 on btrfs over LUKS I came to the activation of the automatic APT snapshots. Here it shows up that any call of apt-btrfs-snapshot crashes, complaining ...
2
votes
2answers
2k views

Unable to install VMware Horizon Client on Ubuntu 18.04

sudo sh ./VMware-Horizon-Client-4.8.0-8518891.x64.bundle Extracting VMware Installer...done. /tmp/vmis.bxQxOU/install/vmware-installer/vmware-installer: line 76: python: command not found Edit: I ...
0
votes
1answer
174 views

matplotlib error : MatplotlibDeprecationWarning

from matplotlib import pyplot as plt /home/rishabh/.local/lib/python2.7/site-packages/matplotlib/colors.py:680: MatplotlibDeprecationWarning: The is_string_like function was deprecated in version ...
0
votes
1answer
196 views

Path of a file in the user directory from root directory [closed]

Following is the directory structure for a text file textfile.txt ,what will be the file path for the text file for an python script readtext.py which is in the in the root direcory. The python file ...
0
votes
0answers
103 views

PyCharm (Anaconda2-Python 2.7) PyQt5 -QtWidgets error

I'm new to Python! So, bear with me if I may not be able to articulate my issue well! As the title states, I am using Anaconda2 with Python 2.7 in PyCharm. When I import PyQt5, all is well until I try ...
0
votes
1answer
31 views

Where does print statements logged when the python code is started during the bootup

I wrote a .service(systemd) to start a python script during the boot up. There service is working fine and is trying to execute the python script. In order to debug python script i placed few print ...
0
votes
1answer
194 views

How to fix repo forall command on Ubuntu 18.04?

I'm trying to use the repo command which I installed via snap on Ubuntu 18.04. Most commands were working okay but when I try to run repo forall I get the follow error: repo forall -c 'pwd' Traceback ...
11
votes
3answers
6k views

easy_install: command not found

I am trying to install MYCROFT on Ubuntu 18.04 following this: LINK cd ~/ git clone https://github.com/MycroftAI/mycroft-core.git cd mycroft-core bash dev_setup.sh I am getting this error: sudo: ...
0
votes
0answers
115 views

Problem with apt-get install python-dev and python package

I try to experiment jupyter and I decided to manually install a last Python2.7 version. I did not get in to work with apt-get install with my distribution (Ubuntu 12.04) but nevertheless I have now a ...
0
votes
1answer
288 views

Cannot install Django using pip

I'm trying to install Django 1.11 on ubuntu 16.04 using pip (python 2.7) I ran the following command: sudo pip install Django but I get: Could not find a version that satisfies the requirement ...
0
votes
1answer
335 views

Problem while installing random in Python [closed]

I am using python 2.7.4 and having a problem while running pip install random. It comes up with this error: Collecting random Could not find a version that satisfies the requirement random (from ...
1
vote
1answer
35 views

How to detect Linux machine power off state using Python

Below is the code I got from this website to detect resume, import dbus # for dbus communication (obviously) import gobject # main loop from dbus.mainloop.glib import DBusGMainLoop # ...
4
votes
2answers
894 views

Error upgrading Ubuntu 16.04 LTS python-minimal package error

Everything was going very smooth until today when I decided to upgrade Ubuntu 16.04.3 to 16.04.4 When it was in the last stage of installing the downloaded updates, python-minimal packaged failed to ...
1
vote
0answers
269 views

How to force bash terminal to run Enter after recieving command via python os.system()?

I am running some bash commands via python os.system('/vt -start ./home/mydb ./home/images/image-001-053.png 2>&1 | tee ./ results.txt >/dev/pts/2'). This is a command which can be run on ...
0
votes
0answers
339 views

The package “software-properties-gtk” needs to be reinstalled, but I can't find an archive for it

I'm using ubuntu 16.04. Whenever I tried to install new package, "The package software-properties-gtk needs to be reinstalled, but I can't find an archive for it." this error is occurred: Thanks....
1
vote
1answer
243 views

Is it possible to run/execute a bash script command from inside a python code?

I am not an expert, so I am asking my question here. I have C++ code which is using openCV modules. I need this program to send an image (img1.png) from a python code to be processed by this C++ code. ...
0
votes
0answers
674 views

ImportError: No module named itertools

I am trying to run this script: python schema2.py Traceback (most recent call last): File "schema2.py", line 1, in <module> import itertools ImportError: No module named itertools and I ...
0
votes
0answers
112 views

Errors were encountered while processing: python-minimal

I am continuously getting this error Errors were encountered while processing: python-minimal after I try to install anything through sudo apt-get install ....Initially, my enable wifi option ...
0
votes
1answer
320 views

can I open excel files in ubuntu using python?

How do I work on .ods file in ubuntu file using python? Is there any module that can help me interact with excel files using python?
0
votes
0answers
511 views

libsodium.so.23 when using SSR in ubuntu 16

I'm trying to use shadowsocksR in my Ubuntu 16.04 LTS. sudo apt-get install git git clone -b manyuser https://github.com/shadowsocksr-backup/shadowsocksr.git cd shadowsocksr/shadowsocks python ...
0
votes
2answers
7k views

How to add python path in Ubuntu 16.04

I'm trying to run a scrapy project on a ubuntu server. For which I need to add the project path to python path. I created a .bash_profile file in the /home directory with the following contents: ...
1
vote
2answers
572 views

Switching between python 2.x and 3.x in linux machine.And also what is the function of virtualenv in this case?

I am having two code bases build_2.x and build_3.x which was coded in python 2.x and python 3.x respectively. I owning linux machine in that python 2.x is installed. But for my project purpose I need ...
0
votes
2answers
193 views

while creating module getting error

used this command to create module - python manage.py startapp todos getting this error: Traceback (most recent call last): File "manage.py", line 17, in "Couldn't import Django. Are ...
0
votes
1answer
715 views

apt-get install python-dev is failed to unmet dependency [duplicate]

I am not able to install python-dev on my server. CPU - ARM64 OS - Ubuntu16.04.03 It failed due to unmet dependencies. I have already tried for update,upgrade, force install and followed with ...
0
votes
0answers
175 views

terminal does not open & malfunctioned with python

I was trying to use python 3 as default python and i used this commands below and they malfunctioned my pc sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 then now i ...
0
votes
1answer
326 views

Error while installing pip install pgadmin4-1.4-py2.py3-none-any.whl

I am new to Ubuntu and I am trying to install pgadmin4 with pip install pgadmin4-1.4-py2.py3-none-any.whl But received the following error while installing pgadmin4: Command "python setup.py ...
0
votes
1answer
2k views

Unable to upgrade Requests lib Python

I am trying to upgrade Requests lib for Python 2.7.6 on Ubuntu 14.04, but I can't. If I try to run sudo pip install requests --upgrade I get this message: Downloading/unpacking requests from https://...
0
votes
0answers
92 views

Messed up python's environment

Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal ...
15
votes
3answers
15k views

python2.7 broken by weakref import error, please help!

I just updated from 16.04 to 17.10, and every time I attempt to run any python2.7 command, I'm getting this error: pip install --upgrade pip Traceback (most recent call last): File "/home/XXXX/bin/...