Python is an interpreted programming language that is often, but not solely, used as a scripting language. A version of Python is included by default on all Ubuntu distributions.

learn more… | top users | synonyms

10
votes
3answers
7k views

How to install and configure IPython so it uses Python3.2 on 11.10?

How to install and configure IPython so it uses Python3.2 on 11.10? I've checked that by installing sudo apt-get install ipython will use python2.7. [EDIT1] $ sudo python3 configure.py ...
1
vote
1answer
11 views

python-pip package not found on ubuntu 15.04 running as live usb

I'm trying to install python-pip using apt-get on ubuntu 15.04, but I get an error saying it's not found. ubuntu@ubuntu:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu ...
2
votes
6answers
188 views

How can I extract text between a pair of the same character?

Input: blahŤfoobar1Ťblah Desired output: foobar1 I want to get the text between two "Ť" characters. Assume there will always be either 0 or 2 "Ť" characters, to make things easier. I tried the ...
4
votes
1answer
10k views

Unable to locate package python-pip

Hi I am trying to install electrum in my ubuntu live usb. Please forgive me because I am very new to this OS. I have also made a presistence 4GB space for future installation sofwares. How can I get ...
0
votes
0answers
21 views

.desktop-file two part exec line

I am trying to get bleachbit to run. Unfortunately I get the error, that it could not import gtk. It seems that this is due to me having python 2 & 3 installed. Starting bleachbit over the console ...
12
votes
1answer
3k views

How can I get tab-completion in the interactive Python interpreter?

I often use Python 3000's interactive interpreter, but it's missing the convenience of tab-completion I'm used to from ipython, which isn't available for Python 3.x. How do I enable tab completion in ...
6
votes
2answers
3k 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
5k views

ssl missing from Python. 'module' object has no attribute 'HTTPSConnection'

My main issue is that httplib module of python is missing HTTPSConnection. When I try to use pip to install fabric using pip it gives me this error: 'module' object has no attribute ...
0
votes
2answers
211 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 ...
2
votes
1answer
23 views

clear situation of python installations with different versions

I have a confusing situation with my python installation on ubuntu. $ python --version Python 3.4.0 $ python2 --version Python 3.4.0 $ python3 --version Python 3.4.0 $ ls -la /usr/bin/python2 ...
1
vote
1answer
2k views

How to install Visual Python?

I'm a Linux newbie but I'm determined to get my favorite applications on my laptop running Ubuntu 12.04. I just installed Cinnamon. I'm trying to install Visual Python and it requires Python 2.7. I ...
0
votes
1answer
35 views

I want to write weather data via a python script twice a day to a csv file [on hold]

Is this practical? How do I accomplish it? Some barriers I've come across already: I have separate scripts for weather and time. How do I format them into one comma-separated row? how do I print ...
1
vote
0answers
36 views

variable assignment syntax error in python in ubuntu 12.04

I have a file, main.py, with code as: import CreatingTable CreatingTable.Creating() I get the following error: In the following code of CreatingData.py there are text files with data in them as ...
0
votes
1answer
18 views

ImportError: Ipython requires Python version 2.7 or 3.3 or above

I am trying to use ipython notebook. But when i execute ipython notebook, it gives me below error. I have both ipython 2.7, and 3.3. But even than it can not detect ipython 2.7. How can i append ...
2
votes
1answer
5k views

Why do I get ImportError when trying to import Pandas Python module?

I installed the Pandas module for Python 2.7 using apt-get. However, when I try to import the module, it raises an ImportError: import pandas as pd File ...
0
votes
0answers
19 views

Why Is the Package Installer Giving the “Dependency is not satisfiable” Error Even After I've Installed the required packages?

I'm trying to install GameTree. I downloaded the deb. file from the site and tried to open it with the package installer. It popped up dependency is not satisfiable: python (>= 2.4) This is ...
0
votes
1answer
394 views

pyvenv vs venv vs python-virtualenv vs virtualenv and python 3

malikarumi@Tetouan2:~$ pip install virtualenv Collecting virtualenv Downloading virtualenv-12.0.7-py2.py3-none-any.whl (1.8MB) 100% |################################| 1.8MB 330kB/s ...
0
votes
1answer
35 views

running python packages from user local directory

I'm on a Shared hosting, with a limited SSH access. don't have sudo privileges. And there are some limitations on some folders, as the following: This is the output of the termial ls -al : ...
-2
votes
0answers
18 views

After run '>>> GPIO.setup(1, GPIO.OUT)', app python3 crash: [on hold]

After executed the followings commands, app python3 crash: ~# rp01@rp01:~$ sudo python3 [sudo] password for rp01: Python 3.4.3 (default, Mar 26 2015, 23:09:09) [GCC 4.9.2] on linux Type "help", ...
1
vote
1answer
3k views

Install python setup tools for Ubuntu 12.04

I am trying to install Savanna in OpenStack but I am getting this error that I have posted on askubuntu.com Someone told me that it might happen because I have not right version of python-setup-tools ...
0
votes
1answer
2k views

pip install … Failed with error code 1

I'm trying to configure my new system with Ubuntu 13.10 but pip won't let me install anything. No matter what package I try to install I always get the error: ...failed with error code 1 in ...
0
votes
1answer
163 views

Install something without make install [closed]

I have been struggling for few days trying to install a software. I'm not actually working on Ubuntu but I think the steps to do are the same. Working on a gentoo (The operating system of the Robot ...
26
votes
2answers
23k views

apt get install vs pip install

I am a bit confused about the cases in which the above commands must be used when downloading python packages. I was trying to download a package named pyudev in accordance with an answer with this ...
1
vote
1answer
50 views

AttributeError: type object 'IP' has no attribute 'SubnetSet'

I'm trying to install OpenVPN access server on a virtual server with Ubuntu 14.04 OS. But I get this error: Use local authentication via internal DB? > Press ENTER for default [no]: Traceback ...
-1
votes
1answer
23 views

Explaination about modules in python [on hold]

what are modules and explain a bit about how they work? import hello The hello program will be as follows: hello.py def func(a,b): print 'a is',a; print 'b is',b; what will be ...
1
vote
1answer
29 views

What is the difference between these python functions?

What is the difference between this: def total(initial=10, *numbers, **keywords): count = initial for fake in numbers: count = count + fake for key in keywords: ...
0
votes
0answers
11 views

A new window in glade using python [closed]

How can I make a new window appear by just a pressing a button in glade application? Python commands are appreciated :)
0
votes
1answer
22 views

How can I disable “selection by clicking ” on GTK treeview [closed]

I have this code where I get a treeview and a sign when I click or move the up / down over the lines. For my application I need to disable the selection when the user clicks on a row, further I wonder ...
0
votes
1answer
3k views

gtk problem in ubuntu 12.04

I installed ubuntu 12.04 64-bit I have python 2.7 with some additional packages. When I try to use simple command in python like for example help('modules') I have an error and python terminates. ...
1
vote
1answer
17 views

Cannot install lxml on Ubuntu 14

I have problems installing lxml on my virtual machine, cloud server, Ubuntu 14.04.2 with 512MB RAM. For people that are going through this, I will document little steps of problems that occurred on ...
5
votes
2answers
1k views

Missing Python in LibreOffice organize macros menu

I have the LibreOffice 4.0.2.2 that comes with Ubuntu 13.04. The Tools-Macros-Organize macros menu only shows the LibreOffice Basic item. I assumed I would find also Python and other languages. This ...
0
votes
1answer
31 views

how to use python 3's pip?

I want to switch my project from python 2.7 to python 3.4 and I want to use python3's virtualenvwrapper and pip. I have tried sudo apt-get install python3-pip, easy_install3 pip and python3 ...
0
votes
1answer
15 views

How to make python module run in dist-packages folders in the desired order?

I am using Ubuntu 14.04. I have installed a python module called PyBluez. When I compile and install the module from source code, the output is installed in the folder ...
-1
votes
0answers
29 views

python file for execute file [closed]

I want execute python file for testing. I have text file and python file. How can I write loop ? #!/bin/env python testSE.py import subprocess import os import sys import requests import optparse ...
3
votes
6answers
308 views

Use bash to extract number from between square brackets

My file looks like this: [581]((((((((501:0.00024264,451:0.00024264):0.000316197,310:0.000558837):0.00857295,((589:0.000409158,538:0.000409158):0.000658084,207:0.00106724 ...
0
votes
0answers
21 views

Python Imaging Library (PIL) in UNIX jpg - bmp [closed]

The Python Imaging Library (PIL) is meant to Convert a jpg (Jpeg) image into bmp (Bitmap) image on python. I am attempting to have this program on UNIX Operating System on a raspberry pi and cannot ...
1
vote
2answers
1k views

How to install pyzmq for iPython Notebook in a Python 3 virtual environment?

I wanted to use iPython Notebook in Python 3 on Ubuntu 14.04. Because I have both Python 2.7 and Python 3.4 installed on my system--and for other implementation-specific reasons--I decided to use a ...
0
votes
1answer
19 views

Installed script with pip: Run like a command

I installed this python script scdl to download audio from soundcloud. The script is installed to ~/.local/bin How can I run this script in a terminal like a programm? So I don't enter the whole path ...
20
votes
4answers
43k views

How to create a virtualenv with Python3.3 in Ubuntu?

I'm running Precise Pangolin amd64. I installed Python 3.3 from ppa:fkrull/deadsnakes. Now I want to actually use this new Python version in a virtualenv. But How can I do this? I get the following ...
-1
votes
0answers
28 views

Using google protocol buffers: downgrading protoc

I am trying run a python code that has sections generated from proto files. However the internal syntax is for protocol-buffers 2.6.1, while i have 3.0.0. I tried to pip install -I protobuf==2.6.1 ...
5
votes
2answers
5k views

Ubuntu Software Center crashes due to error in its Python code

I searched for that, but did not find any reference to it on this site. If you know some, please refer me to it - the issues I have seen have different symptoms. So, to the point... I had Ubuntu ...
1
vote
0answers
24 views

How to edit and refresh a locally opened html using python script?

Using python program a local html file is opened in browser,there is a table in the html file,I want to edit the content of a cell in the table. Also I want to refresh it using python,since the ...
1
vote
1answer
18 views

How do I install pybel such that my python environment recognizes it?

On Chemistry Stack Exchange I asked a question regarding Open Babel & Python being used together. The problem is that the answer I was provided (by Geoff Hutchinson) requires Python to be able to ...
0
votes
1answer
18 views

install colorama python module

I import colorama in python code and I have below error : Traceback (most recent call last): File "stevoku.py", line 5, in <module> import colorama ImportError: No module named colorama and I ...
2
votes
2answers
137 views

Problem with Java while trying to run pycharm-community-4.5

I've just installed pycharm-community-4.5 into my Ubuntu 14.04 (64 bit). After installing I ran the command /opt/pycharm-community-4.5/bin$ ./pycharm.sh to run pycharm but the terminal showed me some ...
0
votes
1answer
35 views

Playonlinux asks to install Python

just few days ago I installed other version of Python on Ubuntu (I need it for coding). Installation of Python went pretty much smoothly, but when I try to launch League Of Legends I get a problem. ...
3
votes
1answer
39 views

Pycharm broke pip

Situation: Whilst using Pycharm on a python3 project, I came across the option under the "Project Interpreter" settings to install a package manager. I clicked it absentmindedly and immediately ...
1
vote
1answer
34 views

Link button to application in Glade

I'm new to Glade and I just love the possibilities this program has for (beginner) GUI developers. I started making an application with some text and buttons and I would like to assign a button to ...
1
vote
0answers
15 views

How to get gnome session idle time?

Has the method to get the session idle time through dbus changed in the recent Ubuntu or my dbus code here is wrong? #!/usr/bin/env python import dbus bus_name = 'org.gnome.ScreenSaver' obj_path = ...
4
votes
3answers
79 views

How I can monitor new files in a directory and move/rename them into another directory?

A program generates output textfiles, named output.txt, after every 15th iteration of a certain process. Doing so, it overwrites the last output.txt. I want to keep the files however, and I can't ...