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

-1
votes
0answers
12 views

Getting the following error while running ncclient. /usr/bin/ld: cannot find -lz

I have installed, prior installing ncclient.. I am not sure what is missing here sudo apt-get install libxml2-dev libxslt-dev sudo apt-get install python-dev gle@snv-csim-vmflow2:~$ sudo pip ...
10
votes
9answers
48k 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 I'...
0
votes
2answers
5k 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 ...
2
votes
0answers
339 views

Python is messed up because of setuptools

I have trouble getting Python working right, after a mixup with Python setuptools. after this, I cannot run flexget and other programs without getting this error: flexget execute Traceback (most ...
1
vote
0answers
15 views

How can I create a pecan project with oslo RBAC support?

I want to create an application with pecan Python web framework and oslo role-based access control (RBAC). How to do that? Scenarios are as follows: I will call the pecan controller using curl or ...
6
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
23 views

Problem installing snapd

I like to install snapd but my computer say message like this: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package snapd how ...
0
votes
1answer
24 views

How to install swi-prolog as a shared library?

I need to develop an expert system using prolog as an inference engine and python as interface. I already have the SWI-prolog installed in my machine, but, i can't import the interface PySwip because ...
1
vote
0answers
21 views

Plotting with Octave and Matplotlib Broken on Ubuntu 16.04

I'm having a problem using plot commands using python-matplotlib and Octave ever since I installed Octave. Prior to installing Octave v4.0.2, I was able to plot with Matplotlib v. 1.5.1 just fine. ...
2
votes
1answer
53 views

Can't import installed packages in python

I installed pip (pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)). My python version is 2.7. I installed pygame by apt-get install python-pygame and got a success message. But when I try ...
0
votes
1answer
72 views

why wont python-pip install matplotlib work?

I just installed kubuntu 16.04 on my computer and started to install some python packages but some of them wont install. the command I type in is pip install matplotlib and it does not work. I get ...
0
votes
1answer
4k views

How can i Download attachments from an email using Python?

My Current python script can download attachments from Gmail. But i want to Download Attachments from any other email services than Gmail. Ex: Other email services are ymail, hot mail, etc .. Is ...
0
votes
0answers
86 views

How do I install python 3.5.2?

It's my first time using ubuntu so I don't know how to use it very well yet... How can i install python 3.5.2 ? It has already the version 2.7.12 . My Ubuntu version is Ubuntu 16.04 LTS (desktop).
0
votes
0answers
20 views

Python 2.7 and pip from 3.5

I do not know what has happened because this used to work fine but I'm now experiencing a problem where I am running python2.7 but for some reason pip is installing in my python 3.5 dist-packages. At ...
2
votes
0answers
16 views

Python unknown encoding utf8

I need to renew my Letsencrypt certificate, but python doesn't find UTF8 encoding. I had a suggestion to reinstall Python, but I Ubuntu 14 doesn't let me.
1
vote
2answers
983 views

No such file or directory: '/usr/lib/python2.7/sitecustomize.py' but it is there in red color

While trying to install denyhosts, I got this error: IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/sitecustomize.py' I verified that /usr/lib/python2.7/sitecustomize.py ...
0
votes
0answers
26 views

GET Node details

When I call the Maas API with resp = self.client.get(u"nodes/%s/" % node_id, "details") print resp.read() I am getting following o/p How can I iterate over this?
0
votes
0answers
17 views

python-gobject-2 is deprecated , tried installing other packages , not working

Apps like software-center and appgrid don't work. I'm a beginner: can anyone help me please?
6
votes
5answers
46k 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 ...
1
vote
0answers
34 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 ...
65
votes
7answers
102k 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
52 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
18 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 ...
0
votes
0answers
32 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
51 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
34 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
458 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
8k 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
100 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
45 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
530 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
16k 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
56 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
87 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
70 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
129 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
273 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
15k 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
2k 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
133 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
15 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
563 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
63k 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
375 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
138 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
77 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
91 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 ...