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.
421
questions
46
votes
3
answers
54k
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 ...
32
votes
6
answers
157k
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: ...
30
votes
9
answers
143k
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'...
30
votes
9
answers
205k
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 ...
30
votes
4
answers
47k
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/...
26
votes
6
answers
71k
views
Jupyter Notebook Installation
Is it possible to install Jupyter Notebook through apt-get install? For example, we can install numpy by using apt-get install python-numpy.
24
votes
3
answers
245k
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 ...
24
votes
3
answers
128k
views
ImportError: No module named sklearn
I installed scikit-learn on following these instructions
Even when I try now to run again: sudo pip install -U scikit-learn
I get this message proving again that installation is ok:
Requirement ...
24
votes
7
answers
120k
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/...
22
votes
3
answers
19k
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 compilation ...
20
votes
5
answers
68k
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 ...
18
votes
6
answers
51k
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 ...
17
votes
4
answers
113k
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 python-...
17
votes
8
answers
123k
views
Python3 pip3 install broken on Ubuntu
I installed python3 and pip3 successfully on my Ubuntu16.04, but pip3 install is broken. How can I fix this problem? The error information of pip3 install is as follows:
# pip3 install xlwt
Traceback ...
16
votes
4
answers
162k
views
pip install gives "Command "python setup.py egg_info" failed with error code 1"
I am trying to install python package rpy2 with pip install on Ubuntu 16.04:
pip install rpy2==2.2.7
but get error message (see full output below):
Command "python setup.py egg_info" failed with ...
14
votes
2
answers
38k
views
How to remove Python 2 from Ubuntu 20.04?
I've upgraded recently from Ubuntu 18.04 to 20.04. But I can see that Python2 is still the default instead of python 3.8.2.
$ python -V
Python 2.7.18rc1
$ python3 -V
Python 3.8.2
Is it possible ...
14
votes
2
answers
136k
views
How do I install python 3.5.2? [duplicate]
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).
13
votes
1
answer
24k
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 ...
12
votes
1
answer
20k
views
pygtk not available on Focal Fossa (20.04)? [duplicate]
tl;dr I cannot install pygtk on Focal Fossa (Ubuntu 20.04) anymore but need it for my self-written PyGTK-based Python application.
I wrote a Python2 application some years ago based on GTK using the ...
12
votes
1
answer
6k
views
Is it safe to remove Python 2.7.15rc1 from Ubuntu 18.04?
I upgraded my laptop from Ubuntu 16.04 to Ubuntu 18.04 as soon as I got it and I am not using Python 2.
Is it safe for me to remove it?
My terminal is showing the default version as Python 3.7.3.
10
votes
2
answers
66k
views
How to list/access all the available audio input and output ports/channels of a USB soundcard from a particular PC
In Windows 7, I used to use pymedia, a python library, to list the available interfaces as well as use them for playing and recording audio. A typical query would look like this:
Now, I'm no longer ...
8
votes
2
answers
53k
views
How to install the cPickle module?
I was unable to install the cPickle module 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 ...
8
votes
2
answers
6k
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 ...
8
votes
1
answer
7k
views
Checking for 'gee-0.8' >= 0.8.0 : not found
I am trying to install pysoy and at the stage of configuration using
./waf configure
it gives an error as seen below
Checking for 'gee-0.8' >= 0.8.0 : not found
The configuration ...
8
votes
1
answer
11k
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: Windows ...
8
votes
2
answers
5k
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....
8
votes
4
answers
21k
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 ...
7
votes
4
answers
77k
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
...
7
votes
1
answer
30k
views
How to remove python 2.7.15rc1 in Ubuntu 18.04
When I checked Python version as normal user, it is showing Python 2:
$ python --version
Python 2.7.15rc1
And when try to run as root :
# python --version
Python 3.6.7
Any suggestion how to remove ...
7
votes
2
answers
48k
views
How to update Python to the latest version on Ubuntu 16.04
I am trying to update my python version but whenever I try:
pip install --upgrade python
the output is:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade
...
7
votes
4
answers
4k
views
Eclipse Crashes with Linux Kernel 4.4.0-81-generic
I'm running the Gnome version of Ubuntu 16.04.2 LTS 32 bit.
I am also running Eclipse 3.8.1 with the PyDev plugin.
Recently my software updates updated me to Linux kernel 4.4.0-81-generic and now ...
7
votes
1
answer
24k
views
What does my PYTHONPATH contain?
I work on some personal python libraries and I need to display what PYTHONPATH contains and then manipulate it.
7
votes
7
answers
32k
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.
6
votes
2
answers
18k
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 ...
6
votes
1
answer
45k
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
2
answers
13k
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 ...
5
votes
4
answers
4k
views
Duplicity with B2 Backblaze issue
Running 18.04LTS
I've installed Duplicity... it seems to work. I'm running duplicity 0.7.18.2.
I've installed the B2 Command line tool... it works without issue.
I get the following when I try to ...
5
votes
2
answers
8k
views
How to get PyQt5 for Python2 on Ubuntu 20.04
I have a critical PyQt5 application which is still in the migration to Python3 phases.
K/Ubuntu 20.04 has removed the required packaging to install PyQt5 for Python 2.7. I understand the importance ...
5
votes
1
answer
13k
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 module....
5
votes
1
answer
6k
views
Ubuntu 20.04 - need Python 2 - native Python 2 install vs other options?
I've been using Ubuntu 20.04 for a few months now and things are going well, however recently I ran into 2 legacy applications which I'll need to start supporting that will require Python 2. As best ...
5
votes
2
answers
23k
views
How to create python2.7 virtualenv on Ubuntu 20.04
I want to run an application that uses python2.7 version, but by default python2.7 is not installed. When I tried to use:
$ virtualenv -p python2 flaskold
It returned:
RuntimeError: failed to find ...
5
votes
3
answers
4k
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
3
answers
11k
views
Need to have 2 versions of Python without using a VM
I need to have 2 versions of Python installed on my PC. The first must be the latest version in order to use youtube-dl, and the second must be the 2.7 version for a course that says we must not ...
5
votes
2
answers
3k
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 ...
5
votes
1
answer
6k
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" % ...
5
votes
1
answer
962
views
Is there a way to not show .pyc (Python bytecode) files under Nautilus?
Is there a way to disable them under directory structures in Nautilus? My Django-project is getting quite confusing with them.
5
votes
1
answer
7k
views
Python Error when opening software-center
My software center suddenly not working. When i tried to open it from the launcher, its only loading but showing nothing.
I tried to run it from terminal, and got this error :
Traceback (most recent ...
5
votes
1
answer
6k
views
cx_Oracle in Ubuntu: distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
i try to install python dependencies for django project sdu.edu.kz. This project uses cx-Oracle.
When i try:
./install_python_dependencies.sh install
It successfully installs all modules except one....
5
votes
2
answers
4k
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 ...
5
votes
1
answer
2k
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 ...