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

10
votes
4answers
12k 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?
9
votes
2answers
9k views

How can I remove python 2.7 after installing python 3.3?

I have successfully installed python 3.3 on Ubuntu 12.10. Since I don’t need multiple versions of python, I want to remove the existing python 2.7. When I try to do that, using sudo apt-get remove ...
8
votes
3answers
19k 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 ...
7
votes
3answers
5k 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 ...
6
votes
2answers
5k views

Install uwsgi 1.2.5 via pip

Welcome, Currently I'm trying to install latest uwsgi on my VPS (Ubuntu 11.10) based on instruction from the site http://projects.unbit.it/uwsgi/wiki/Quickstart pip install uwsgi During ...
6
votes
4answers
30k views

How to compile a python file?

I have started learning python and i'm also a new user to Ubuntu. I need to know the ways of compiling the .py files.......I have tried with the command python "hello.py" what are the other ways of ...
5
votes
2answers
3k views

Changing Python default in 12.04 LTS

I have downloaded and installed python 3.2.3 for Ubuntu/Debian. Also IDLE IDE for 3.2.3. If I execute IDLE for 3.2.3 explicitely, 3.2.3 runs under IDLE and all is well. But if I go to a terminal ...
5
votes
1answer
418 views

Python-Speechd?

I just upgraded to Ubuntu 12.10, am fooling around with some Python code. In earlier releases, I used to be able to do: import speechd And now I get that the module does not exist. It also tells ...
3
votes
9answers
12k views

I run `sudo apt-get remove python2.7`, can I restore my Ubuntu now?

I wanted to remove and reinstall python2.7 interpreter on 12.04 But when I did sudo apt-get remove python2.7, The crazy terminal started to remove everything!!! Any idea how I can restore whatever ...
3
votes
2answers
11k 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 ...
3
votes
1answer
297 views

How do i tell ubuntu to only install is asked for and do not bring other dependencies which will break the whole system?

How can i only install python-webkit but not other packages? which is showing to install? (no gstreamer*.*, i do not want to have any single files installed in my distro because of GPL license and it ...
3
votes
1answer
695 views

unoconv is not working in python

I've an issue while using unoconv to convert docs to html from a Python script. It works perfectly when I run the script or the unoconv commands as root, but it fails when I do the same from other ...
3
votes
1answer
656 views

How can I install pygame 1.9.2 on ubuntu 13.04?

The python-pygame package contains version 1.9.1release, but I need features from 1.9.2. Is there a PPA available for the latest pygame release? Thanks in advance!
3
votes
1answer
339 views

Where can I find the python Tools directory?

The python2.7 documentation refers to a Tools/scripts directory and a Tools/demos directory, but those don't seem to be on my computer. locate Tools/scripts doesn't find anything. A post on ...
3
votes
0answers
243 views

Accessibility bus error when packaging

When i do quickly package i get the flowing warning. Not a big deal but because this warning i can't share my package to my ppa. ** (setup.py:5679): WARNING **: Couldn't register with accessibility ...
2
votes
3answers
7k views

need to have 2 versions of python?

Well, as I say, I need to have 2 versions of python installed on my PC. The first must be the latest one in order to use youtube-dl, and the second must be the 2.7 version to use it for a course ( ...
2
votes
1answer
261 views

Python interactive interpreter: initial tab is 4, subsequent tabs are 8 spaces

When I use the interactive Python interpreter, the width of the tabs seem out of sync with each other. Specifically, the first tab gives me a tab width equivalent to 4 spaces, while the next tabs ...
2
votes
2answers
19k views

Copying multiple specific files from one folder to another

I have a large folder of pictures (thousands), and I have a long list of files, by exact file name, that I need to copy to another folder. I want to know if there is a way I can select several ...
2
votes
1answer
194 views

Beautiful Soup 4 not working with Python 3.4.0

I am using Ubuntu 14.04 64 bit Operating System . I installed Beautiful Soup 4 using this command : sudo apt-get install python-bs4 With Python 2.7.6 , I had no difficulty importing the bs4 ...
2
votes
2answers
5k 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, ...
2
votes
1answer
503 views

Installing stackless python, how to get modules?

I've followed the instructions found here: http://architects.dzone.com/articles/install-stackless-python and installed stackless. Stackless itself works, but unlike what the tutorial said I cannot ...
2
votes
2answers
2k views

Python 2.7: no documentation found when typing help('print')

I have just installed Python 2.7 and Python 3.2 on my Ubuntu 12.04 (32 bit). sudo apt-get install python python-doc python3 python3-doc I opened a Python 3 shell (is it called like that) typing ...
2
votes
1answer
55 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) ...
2
votes
1answer
463 views

Python ImportError after reinstallation of nautilus

I have a problem with python on my Ubuntu 12.10. Firstly the problem arose when I was trying to reinstall nautilus because of some troubles with it. I used apt-get --reinstall install nautilus*. The ...
2
votes
1answer
102 views

PyKaraoke not working on Ubuntu 12.10. Will it be for python3?

I have Ubuntu 12.10 and PyKaraoke was not working before I worked in 12.10. It now opens but I can not add folders to the library. Only the Home folder.
2
votes
1answer
1k views

Python ImportErrors while trying to get a program (found on Google Code) to work

I'm trying to install a program written in Python / -->http://code.google.com/p/amphetype/<-- / I did subversion checkout svn checkout http://amphetype.googlecode.com/svn/trunk/ ...
2
votes
6answers
12k views

Eclipse not showing Pydev in Preferences

After installing Eclipse and python I am not able to see Pydev on eclipse. When I try to install eclipse again it is showing as duplicate location.
2
votes
1answer
88 views

Text justification in gtk.MenuItem

I'm writing an appindicator python script for my Gnome panel (under Ubuntu 12.10, English as the system-wide language) with a gtk.Menu, containing MenuItem's with Hebrew labels. The text is correctly ...
2
votes
1answer
65 views

Install PyNSource in Ubuntu 12.04

How can i Install PyNSource in Ubuntu 12.04 LTS (the python version is 2.7)
2
votes
0answers
272 views

libreoffice Python Uno support for Python 2.7 on Ubuntu Saucy 13.10

I recently upgraded to Ubuntu 13.10 and discovered that the python-uno package is no longer available. Instead I find a python3-uno package. Unfortunately I need Python uno libreoffice support for ...
2
votes
0answers
695 views

python-plugin installation

I try to play online radio in the Chrome web browser. It said this following installation: Required plugin could not be found Python(2.7) requires to install plugins to play media files of the ...
2
votes
0answers
199 views

python2.7 help() modules returnd error

# python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.7! ...
2
votes
1answer
68 views

How to a deb package without Quickly?

I am developing an app now, I'm using GSetting as my setting back-end, but I can't make my .gschema file installed while open the .deb file. I'm wandering if there is some simple guide for green ...
1
vote
1answer
1k views

Error installing scrapy in virtualenv using pip

pip install scrapy Downloading/unpacking scrapy Downloading Scrapy-0.24.2-py2-none-any.whl (502kB): 502kB downloaded Downloading/unpacking pyOpenSSL (from scrapy) Downloading pyOpenSSL-0.14.tar.gz ...
1
vote
3answers
67 views

Adding file paths to Python code

I am currently running the code for a program called HotNet. In its simpleRun.py file, there is a place to insert a file path to be run. parser.add_argument('-mf', '--infmat_file', required=True, ...
1
vote
1answer
96 views

How to install pythoncard?

I am currently running ubuntu 13.10.I want to download pythoncard for python2.7.6.I also have anaconda1.8.0.So whenever i start python in my terminator or terminal,it starts along with anaconda.
1
vote
1answer
327 views

Why am i getting an error SyntaxError : invalid syntax [closed]

This is a python code for which i am getting an error... from scipy import * from matplotlib.pyplot import * x=arange(0.1,100,0.1) f=zeros(len(x)) s=-1 for n in range ...
1
vote
2answers
56 views

Changing python version without breaking software center

I have been fiddling with my Python installation on Ubuntu 12.04 (I was having trouble installing a python library), and at one point my python command wasn't working. It turned out the symlink was ...
1
vote
1answer
2k views

Python 2.7.6 on Ubuntu 12.04 How to?

I'm developer and I need to make my enviroment work with Python 2.7.6 (not 2.7.3) on the Ubuntu 12.04. Please, provide me some notes how to do that?
1
vote
2answers
391 views

How to install python-guestfs and libguestfs-tools in python virtual environment?

Can any one help me out to install python-guestfs and libguestfs-tools in python virtual environment? I tried to install those packages with the help of pip install but it fails to install because ...
1
vote
2answers
520 views

How do I open a .py file in the interpreter?

I don't know how to open a .py file in the interpreter. When I double click it, it opens in gedit. Can you help?
1
vote
1answer
631 views

I cannot install Python modules

When I try to use pip or easy_install I am getting following errors for any kind of modules I try to install. I ve looked for all the output errors but I dont understand th reason behind. Searching ...
1
vote
1answer
16 views

Make pycharm default for .py files in 14.04

I want to make pycharm ide default for all .py files in ubuntu 14.04. I have extracted the tar.gz file in my home directory but every time i have to run pycharm i have to go over to the bin ...
1
vote
1answer
73 views

Two python distributions, sudo picking the wrong one

I'm back to Linux after an over 10 year abstinence (fool me thinks). And a little rusty in the sys admin department. I'm faced with an issue with my python distribution. I'm using Python 2.7, but ...
1
vote
1answer
917 views

python error IndentationError: expected an indented block

I started to learn python , but when I try to make an function I get this error IndentationError: expected an indented block I use the terminal and write python then start to write the function ...
1
vote
1answer
358 views

How can i install SPE(Stani's Python Editor) for python3.3

I have ubuntu 13.10.I have SPE which runs for python2.7.4+.But i need to run it for python 3.3.2+.How can i do it.My system uses python2.7.4+ by default.
1
vote
1answer
929 views

Taking screenshot using python

The below code work perfectly when I run it as a console application import gtk.gdk import time w = gtk.gdk.get_default_root_window() sz = w.get_size() print "The size of the window is %d x %d" % ...
1
vote
1answer
121 views

Installing python modules to non-default interpreter [Ubuntu 10.04]

I had python 2.6 as default interpreter. I installed 2.7 and I can use it via command line #>python2.7 ... Now I want to install some modules [PyMongo, MySqlDB etc.] using pip to this new version. ...
1
vote
1answer
2k views

How to solve pkg_resources.VersionConflict error during bin/python bootstrap.py -d

I am tring to create a new plone environment using python plone-devstart.py tool. I got a bootstrap error. So i used a command bin/python bootstrap.py -d from my project directory. It(bin/python ...
1
vote
1answer
201 views

mod_python returns plaintext script?

Ubuntu 12.10 Server in a virtualbox VM. I have installed mod_python using apt-get,enabled it using a2enmod, and rebooted apache2. I have also edited \etc\apache2\sites-available\defaults as below. ...