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

0
votes
2answers
4k views

Python - AttributeError with hashlib: no such attribute: “openssl_md_meth_names”

I don't know why this is happening, but after some crazy recovery from installing python from source, when anything imports hashlib, it comes up with something like this error: Traceback (most recent ...
1
vote
0answers
32 views

Unable to install Pillow on Ubuntu 15.10

I m trying to install pillow via the command : pip install pillow on my Ubuntu machine but I repeatedly get this error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 How can I fix ...
63
votes
7answers
94k 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?
0
votes
2answers
48 views

Eclipse, for python project not jumping to function definition

In Eclipse, I created a Python project properly by installing all the plug-ins. But now I'm unable to jump to respective module (source file) and method (function definition). Please suggest me ...
0
votes
0answers
17 views

why other python modules are not incoorported with virtualenv

Hi I have downloaded pymorph module through virtualenv. I activated it to be able to use that module in my code. It works fine and my code is working under virtualenv. The problem is the other python ...
5
votes
1answer
2k views

Alsa problems with python2.7- Unable to open slave

I am using python's module pyaudio to process sound but ALSA returns: ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open ...
0
votes
0answers
19 views

Unable to import python module in python after installation

After installation of any python module using pip or apt-get I am unable to import it in python3. I am able to do so in python 2.7 .This probably is a naive question but I am a novice at using ubuntu ...
0
votes
1answer
36 views

How do I run mulitple pythons with virtualenv in production?

I have installed virtualenv to run a different version of Python than the system Python for my django app. I installed Python 2.7.11 using the method described here. I've modified my uwsgi.ini file to ...
0
votes
1answer
27 views

Python 2.7 crashes in pymol application

I am new to ubuntu, please forgive me for any logical comments. While attempting to load a pdb file in pymol, I will get a system crash report: ProblemType: Crash Architecture: amd64 CrashCounter: 1 ...
0
votes
2answers
443 views

How to download easygui for python3.3?

I have python 2.7 and python 3.3 in my Ubuntu 13.10 system.I have easygui in-built for python2.7 but not for python3.3.But when I download the zip file of easygui and unzip it and type "python3 setup....
1
vote
2answers
7k 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 /home/username/...
1
vote
0answers
65 views

Not able to execute a url from python script running via Cron

I have a script web.py which I am trying to run on the aws EC2 Instance using cron. It basically has these line of codes: import webbrowser webbrowser.open('http://xxxxxxxxxxxxxxxxxxxxxxxxxxxx') If ...
0
votes
0answers
35 views

Pygame/SDL graphics jerky/choppy in 16.04 on Dell XPS 9350

When I run the tutorial pygame bouncing-ball I do not get it moving with a uniform speed; instead it seems to be jerky and choppy, lagging as if the system cannot keep up with processing the animation....
0
votes
1answer
32 views

How to run on ubuntu?

I have to run this file reddit-job-update_popular_subreddits.conf. I go to the file directory using cd command and I put this ./reddit-job-update_popular_subreddits.confbut its not work. "Comand not ...
0
votes
0answers
28 views

terminator not starting when default python is python3.4 but works if it is python2.7

On Ubuntu 15.10 when changing the symlink /usr/bin/python from python2.7 to python3.4 then terminator won t start anymore. Do you know what the problem could be and how to fix it? Thank you :)
0
votes
1answer
279 views

Tostring() has been removed. Please call tobytes() instead

I try to install Reddit on my ubuntu server but I get an error after "make" line. Please see the all lines from the server. [+] including definitions from Makefile.py python setup.py build Cannot ...
3
votes
2answers
15k 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?
0
votes
1answer
50 views

pyhton-pkcs11 package in 16.04

I see that pyhton-pkcs11 isn't included in 16.04 repositories. Only pyhton3-pkcs11. Is there any way to install Python2 package version ?
0
votes
1answer
69 views

uninstall python 2.7.6 and install 2.6 instead

I need to uninstall python 2.7.6 and install 2.6 instead. how can I manage that. which python command gives (/usr/bin/python). my environment is ubuntu 14.04.
0
votes
1answer
54 views

How can I install a newer python on Trusty?

I'd like to install a newer python 2.7 on trusty. Installing "python" installs python 2.7. The newest version available on trusty is 2.7.6. I'd like to install the most updated version of 2.7. I am ...
0
votes
1answer
112 views

Unresolved dependencies trying to install build-essential on Lubuntu 14.04

I am trying to install build-essential (NB: I want to install the getch module for use in python eventually) and apt-get returns an error because of unresolved dependencies which cannot be fixed ...
0
votes
2answers
147 views

change python version from 2.7.9 to 2.7.6 in ubuntu 14.04

I had a Python version 2.7.6 installed on Ubuntu 14.04. By mistake I ran: sudo apt-get install python-dev So it changed to Python 2.7.9. Now I want to revert to 2.7.6. How can I do this?
11
votes
3answers
14k 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 ...
0
votes
1answer
753 views

How to install cPickle?

I fail to install cPickle using pip: $ pip --version pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7) $ pip install cPickle ... Could not find any downloads that satisfy the requirement ...
1
vote
1answer
88 views

installing python-tabulate

I am trying to install tabulate in my python from terminal but I always receive error. the used command and resulting errors are as follows: Command sudo apt-get update sudo apt-get install python-...
0
votes
0answers
12 views

uwsgi doesn't listen on same port if stopped once

I am using uwsgi. While testing i need to re-run the server again and again. But when I run the server once like on port 8080, upon rerunning the server fails to start on port 8080 while it works fine ...
5
votes
2answers
2k 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
364 views

How do I switch back to python2 after Anaconda set python3 as the default?

Recently, I installed Anaconda3-2.5.0-Linux-x86_64.sh on my 15.04 and ended up with this! :~$ python --version Python 3.5.1 :: Anaconda 2.5.0 (64-bit) :~$ python2 --version Python 2.7.9 :~$ python3 ...
12
votes
4answers
61k 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 ...
0
votes
1answer
241 views

Jupyter Notebook Installation

It is possible to install Jupyter Notebook throughapt-get install? For example, we can install numpy by using apt-get install python-numpy.
0
votes
0answers
122 views

can't install anaconda 2 on ubuntu 15.10

I downloaded a anaconda installer for linux 32bit which is compatible to my pc, after that i ran the command in terminal bash Anaconda2-2.5.0-Linux-x86_64.sh then i got an error stating no such file ...
3
votes
0answers
54 views

Ubuntu 14.04: Is there a way to reset python 2 and all dependencies to the factory setting?

I am a daily user of python 2 and after something (I am not sure but I believe it was pygments) was installed in my system I am not able to make the things work again as before. I have already lost ...
3
votes
1answer
88 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 ...
0
votes
2answers
6k views

Python.h: No such file or directory #include <Python.h>

When trying to compile pyqt i have an error i have installed all the prerequistes but its still showing the same problem please find an answer for this
5
votes
2answers
620 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 ...
3
votes
2answers
19k 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. ...
4
votes
3answers
6k 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
167 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
731 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 "/usr/lib/python2.7/dist-packages/pip/basecommand....
0
votes
2answers
29 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
40 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
246 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. ...
2
votes
0answers
2k 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
75 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
4k 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
109 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
16k 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, 17:50:...
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 = ET.SubElement(...