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.

learn more… | top users | synonyms

5
votes
2answers
398 views

Why does pip -t not work on Ubuntu 15.04?

I've been having an odd problem with pip on Ubuntu 15.04. When I try to install anything using the "-t" option to put it in a specific directory, it fails with the following error: error: can't ...
10
votes
2answers
10k views

pip won't run. throws errors instead

I am running into problems when ever I run pip with any arguments or flags. I've tried doing apt-get install --reinstall python-pip but it does not help and am at a loss how to fix this Version of ...
-3
votes
0answers
18 views

Equal Dictionary Values [closed]

This my code s = ["Apple" , "orange", "mangoo" , "Tomato" , "grape"] dict = {} x = """ 1. apple 2. orange 3. mangoo 4. tomato 5. grape """ print x while True: b = int(raw_input('what do u ...
50
votes
6answers
65k views

Make default `python` command to use Python 3

I can access Python 3 via python3 command. But I want to make the default interpreter to use python command for Python 3. Simple typing python takes me to Python 2. How to upgrade?
3
votes
2answers
13k views

how to update python version on ubuntu 14.10

I'm trying to figure out what version of python i have installed, and also upgrade it to the latest. When I go to a command prompt and check, it looks like I have an old version of python installed. ...
3
votes
3answers
5k views

Python (v2.7) requires to install plugins to play media files of the following type: Windows Media Audio 8 decoder

when trying to convert some audio files to Ogg Vorbis using Sound Converter I get the following error: Python (v2.7) requires to install plugins to play media files of the following type: ...
0
votes
0answers
30 views

Installing Google Protobuf on Ubuntu 15.10

After downloading, building and installing Google Protobuf, I cannot import it in Python import google.protobuf cannot find the module. Typing protoc --version returns 3. Any suggestion on how ...
4
votes
2answers
369 views

Error installing matplotlib

I got the following error while trying to install matplotlib using pip under Ubuntu 15.04 (Python 2.7.9). Traceback (most recent call last): File ...
0
votes
2answers
25 views

python 2.x beside 3.4

From noob to all... Is it possible to have py2.x beside 3.4, preferably with launcher icons for both? If not, how can I start py2 IDE from command line? I prefer py3, but need py2 and it's modules ...
0
votes
0answers
26 views

wget changes Excel file size

I'm using wget to download Excel file with xlsx extension. The thing is that when I want to deal with the file using openpyxl, I get the following error "BadZipfile: File is not a zip file". But when ...
0
votes
1answer
62 views

Can I install new version of python on ubuntu 14.04?

Considering that the current version on my 14.04 LTS Ubuntu of python is 2.7.6, I need a more recent version for dealing with specific libraries (that need >2.7.7)... I don't really understand. ...
1
vote
0answers
251 views

Python - pip pip2 pip3 pip3.5 packages are installed but cannot be imported in any Python session

As I am using Xubuntu I thought perhaps this was a better forum than Stackexchange for some questions relating to pip and Python Today I have encountered troubles with pip and Python. For some reason ...
0
votes
0answers
39 views

Running python script in Python interpreter

I have recently started using Ubuntu 14.04. I am learning Python and have both Python 2.7 and 3.4 installed. I made some simple scripts and executed them using command python filename.py and it ...
0
votes
3answers
2k views

ImportError: No module named tkinter

When I try to install tkinter using this command: sudo apt-get install python-tk I get this message meaning it is already installed: Reading package lists... Done Building dependency tree ...
0
votes
0answers
27 views

How do I get python cgi scripts to work with xampp?

I have XAMPP for Linux 5.5.30 or 5.6.15 installed on my Xubuntu partition. I want to work on some CGI scripts and python web development. I have python 2 installed and also want to work with mysql. I ...
2
votes
3answers
14k views

import numpy - no module named multiarray

On Ubuntu 12.04 64-bit, I installed python 2.7.3, and numpy 1.6.2. When I try to import numpy, I get this: erelsgl@erel-biu:/host/Dropbox/ai/routes$ python Python 2.7.3 (default, Nov 25 2012, ...
0
votes
1answer
2k views

Python: error during generation of XML file from python dictionary

ImportError: No module named elementtree.SimpleXMLWriter The code: import xml.etree.cElementTree as ET root = ET.Element("root") doc = ET.SubElement(root, "doc") field1 = ...
0
votes
1answer
61 views

while installing rethinkdb i'm getting some socket error..how to overcome from that error

While installing rethinkdb, I'm get some socket error. How do I fix the error? I tried: $rethinkdb error: TCP socket creation failed for port 29015: Address already in use.
0
votes
0answers
35 views

Running .py files in Ubuntu

I am working with BooleanNet1.2.7 in Ubuntu and I am trying to run the file "all-initial-states.py", but I am facing problems. I have installed Python2.7 and I have installed all the other packages ...
0
votes
2answers
38 views

unable to run Todo list app in rethinkdb on ubuntu..so can you provide the steps [closed]

When I'm executing cd/user/share/nginx/html, I get No such file or directory.
0
votes
1answer
61 views

python application migration from python-2.6 to python-3

I'm migrating my python application from python-2.6 to python 3. My application has been developed on Ubuntu 10.04 system having python 2.6 support. Now i want to make it work on Ubuntu 14.04 with ...
1
vote
2answers
2k views

Python 2.7 matplotlib provides error?

import numpy as np import matplotlib.pyplot as plt provides the error Traceback (most recent call last): File "/home/xx/PycharmProjects/Udemy/Array_Processing.py", line 2, in <module> ...
-1
votes
1answer
972 views

I am running Ubuntu 14.04, python 2.7.8, I try to install python-setuptools, but it is giving following message

I am try to install python-setuptools but getting following messages: You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: $ sudo apt-get ...
0
votes
0answers
47 views

unable to download rethinkdb getting error..so can you provide steps to download and installation for rethinkdb

warn: Cache size is very low and may impact performance. error: TCP socket creation failed for port 29015: Address already in use.
2
votes
0answers
57 views

rubber failing after upgrade to 15.10

rubber is a program that compiles LaTeX files into pdf document. After upgrading, I receive the following error when trying to run rubber on a document. My apologies for the huge stack trace, but my ...
1
vote
4answers
3k views

Error installing pynauty: “error: command 'x86_64-linux-gnu-gcc' failed with exit status 1”

I'm trying to install the pynauty Python package. When I ran python setup.py build, I got the following error. I have installed the dependencies. How can I successfully install this Python ...
2
votes
1answer
106 views

Using Python 2.6 while python 2.7 is installed

I have an application which when I run it, it gives me the following error: paraview: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or ...
0
votes
1answer
210 views

Can't install Python ubuntu 14.04

I encountered some troubles after installing python 3.4, so I wanted to go back to 2.7. So I removed python, completely... Now when I run this command: sudo apt-get install python(tried all versions ...
0
votes
0answers
18 views

Manual installation of python causing problem

I am relatively new to Linux and am using Ubuntu 14.04. Basically, I've been messing around with some files trying some random stuff. Well, I though I should do another install of Python2.7 for some ...
2
votes
1answer
1k views

NLTK, installed in python 2.7 but not working in python 3.4

I just installed nltk when my default python was the 2.7 version, now when I open the python3 (3.4 version), I can't import nltk, is there any solution to this, to make nltk available for both ...
2
votes
1answer
101 views

Python to Anaconda

I am completely new to python. I have Python 2.7.9 on my computer. Now I need to install anaconda and do scientific programming. How can I proceed to have anaconda and use it to code some problems?
0
votes
2answers
138 views

Set “Allow executing file as program” as default when files are added to a folder later

I have a folder, I am setting its permissions by using chmod. chmod 777 /home/Desktop/Project is success. I am using a tool(.exe) that will download the project from the repository. But after the ...
11
votes
3answers
51k views

Problem installing Python-Dev

I am having trouble installing python-dev. It all started when I tried to install another Python package and got the error: SystemError: Cannot compile 'Python.h'. Perhaps you need to install ...
3
votes
1answer
453 views

ImportError: cannot import name ForwardHeaderGenerator

I'm trying to install the library KD Soap (Qt-based client-side and server-side SOAP component) and I get this error : user@server:/path/KDSoap-master/autogen$ python autogen.py Traceback (most ...
2
votes
1answer
594 views

Removing idle-python2.7 in Ubuntu 12.04

I'm having some issues when updating packages on Ubuntu 12.04: Processing triggers for menu ... Errors were encountered while processing: idle-python2.7 Setting up idle-python2.7 (2.7.3-0ubuntu3.5) ...
0
votes
1answer
253 views

IDLE won't open .py files when I use ctrl+O

I've already tried to get .py files to open with IDLE by default, but no luck. I've used every trick you may want to suggest. I really just want to open up IDLE and from there open a .py file from a ...
1
vote
1answer
455 views

pycurl.error: (35, 'gnutls_handshake() failed: Handshake failed')

On trying to download from a https:// URL with PycURL 'PycURL/7.19.3 libcurl/7.35.0 GnuTLS/2.12.23 zlib/1.2.8 libidn/1.28 librtmp/2.3' in Python 2.7 on Ubuntu 14.04.2, I receive pycurl.error: (35, ...
0
votes
0answers
75 views

Peculiar observations with Opencv BackGroundSubtractorMOG2 module — Opencv-3.0.0, Python-2.7.X, Ubuntu-14.04

I am using the BackGroundSubtractionMOG2() from Opencv-3.0.0 inside Python-2.7.x. I am observing something peculiar. That is, when I create the BackGroundSubtraction object and apply it to the first ...
8
votes
4answers
9k views

python 2.7 => ImportError: No module named _io

I decided to switch from Windows to Linux, so I installed Ubuntu Raring final beta. Unfortunately I have a Python problem. I was trying to use pip from a virtualenv I created, to install packages ...
0
votes
0answers
61 views

Problem with install Trac 0.11.7 on Ubuntu 14.04

I must install Trac 0.11.7 on Ubuntu 14.04.3. http://trac.edgewall.org/wiki/0.11/TracInstall I Install Trac: sudo easy_install http://ftp.edgewall.com/pub/trac/Trac-0.11.7.tar.gz When Create a new ...
0
votes
1answer
3k views

Fatal Python error: Py_Initialize: Unable to get the locale encoding … SyntaxError: invalid syntax Aborted (core dumped)

I installed anaconda by running the bash Anaconda-2.2.0-Linux-x86_64.sh command on my Ubuntu 14.04 system , which installed successfully, after which I was asked to export my new ...
0
votes
0answers
58 views

how can i compile source code with scapy in ubuntu 14.04

I want to make reassembly of fragmented packets which I had received,so that I searched through google and found that "scapy" can make reassembly of those packets.now i downloaded "scapy software for ...
0
votes
2answers
200 views

Give user password in terminal through argument

I have created a python application in my Ubuntu machine which run commands to terminal. I would like when the program start to continue running as root. I know that to get a root terminal we use the ...
1
vote
1answer
141 views

muon is gone after change of python / issues after python 2.7.10 installation on ubuntu 14.4

My muon is gone on my Kubuntu 14.4. If I try to install it with sudo apt-get install muon I get the message The following packages have unresolved dependencies: muon : Depends on: ...
1
vote
1answer
650 views

How can I run programs in /usr/local/bin without sudo or root?

I am on Ubuntu 14.04 LTS. I installed buildozer and it ended up in /usr/local/bin. I can't run it without using sudo or root and that will likely cause problems down the road. Right now trying to run ...
1
vote
0answers
298 views

Numpy/Scipy with Openblas

I've been trying to install Numpy/Scipy and allow them to both use Openblas. I've been following various guides but have been using this one of late. At the end of the guide, there are a couple of ...
1
vote
0answers
30 views

Running MadGraph on Ubuntu

I'm trying to run MadGraph on an Ubuntu virtual machine. The documentation for MadGraph states that I just need python 2.7 and the unzipped MadGraph to be able to run it. Nevertheless, I can't ...
0
votes
0answers
18 views

configuring Python 2.5.6

When give a command : sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5 I got on my screen some processing and at last an error: make: *** [libinstall] Error 1. What wrong am I ...
0
votes
0answers
926 views

How to install python-setuptools properly on Ubuntu 14.04

ivan@MS-7640:~$ python -V Python 2.7.10 sudo apt-get install python-setuptools [sudo] password for ivan: Reading package lists... Done Building dependency tree Reading state information... ...
6
votes
4answers
37k views

How to install h.264 decoder?

I tried playing videos in movie player but only the audio could be heard. I tried playing the video with dragon player but here also only the audio could be heard. A message box appeared showing the ...