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

3
votes
3answers
8k views

Getting .deb package dependencies for an offline Ubuntu computer through Windows

Basically I want to "batch" download a .deb file and all its dependencies at once on a Windows 7 machine (of which I do not have admin access, it is a public computer.) I've seen plenty of Ubuntu ...
0
votes
1answer
28 views

Quickly fails to package help pages

I have been working on making a program (jekyll-helper) using Quickly and a while ago I worked on adding some content to the default help pages. I tested out open the help pages in the program while ...
32
votes
5answers
32k 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
0answers
319 views

Install Scipy at virtualenv

I asked a question a few days back, on how to run an older version of matplotlib and I got an amazing answer back. What I had to do was to execute these commands: mkdir matplotlib_1.1.1 cd ...
1
vote
2answers
5k views

Installing Pygame Ubuntu 13.04

I recently installed Ubuntu 13.04 and want to install pygame. I've attempted doing as instructed on the pygame page (using the source code) however I am unable to install the dependencies and I get ...
2
votes
1answer
86 views

Installation of python's numpy keeps failing

I'm trying to install numpy but the installation keeps failing for some reason. Actually, what I need is python's nolearn, but numpy (and scipy) are dependencies. So I ran: sudo pip install numpy ...
4
votes
1answer
4k 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 ...
1
vote
0answers
21 views

Subscribe for DBUS event of screen power off

My MacBook Pro has a keyboard backlight which is pretty awesome, but there's a slight bug: the screen turns off after a given amount of time, but the keyboard backlight stays on. I've copied over ...
1
vote
0answers
10 views

how to install packages which is not in the cache with python

i install packages in my application using python apt. Some example: import apt cache = apt.cache.Cache() pkg = cache["brukkon"] pkg.mark_install() cache.commit() In this example, brukkon is not in ...
0
votes
1answer
65 views

Ubuntu and Django, no module named 'django'

I have a problem with Django on Ubuntu. When I type python in terminal, terminal returns Python 3.4.1 (default, Jun 2 2015, 15:13:43) [GCC 4.8.2] on linux so it's allright. When I type ...
0
votes
2answers
37 views

python related errors

I have python 2.7.6 installed but When running a python script (RSeQC scripts) with command: $ python script.py I got error: ImportError: No module named qcmodule or ImportError: No module ...
-1
votes
3answers
53 views

How do i download the latest version of Python onto my Linux system?

I can't figure out how or where to find the download for Python. If you don't know, Python is a coding language. I want to learn to code. If you recommend a different thing to learn code, please reply ...
1
vote
2answers
517 views

Install PyCharm IDE from repo (without wget)

Is there a way to install the PyCharm IDE (community version) from a repo (without wget). I think the wget method found in many blogs is too complicated.
0
votes
1answer
33 views

After installing a package, is_installed returns still False, in python apt

by using python apt, i can install packages. Before and after installing the package, i updated the cache. However, before and after installing the package, is_installed returns the same, in other ...
0
votes
1answer
440 views

Install pygame in anaconda

I have anaconda on Ubuntu 14.04. I want to install the pygame module with anaconda. I already run sudo apt-get install python-pygame, but this only works on python, not in anaconda.
2
votes
1answer
1k views

How to Uninstall the Ubuntu SDK?

After Installing the Ubuntu SDK v1.009 on ubuntu 12.04.2 LTS, the computer started behaving in a very unstable manner. Also note that Installing the Ubuntu SDK also installs a lot of test libraries ...
1
vote
0answers
98 views

Python app crash after sending command “GPIO.setup( 7, GPIO.OUT)”?

Python app crash after sending command "GPIO.setup( 7, GPIO.OUT)" !!! Action step: pi@rp:~$ python3 Python 3.4.3 (default, Mar 26 2015, 23:09:09) [GCC 4.9.2] on linux Type "help", "copyright", ...
1
vote
0answers
11 views

How to track the Internet connectivity of two PCs simultaneously using a script?

I have two PCs and I want to monitor the Internet connectivity in both of them and make it available in a page (not local, and something like example.com/statuses) as to whether they're currently ...
0
votes
1answer
106 views

How to Access MySQL with Python Version 3.4

Python comes in two versions: Python 2.7.6 which has now been superseded by Python 3.4.0. The critical line in Python to access MySQL is "import MySQLdb" Thanks to a response from StackOverFlow, I ...
2
votes
1answer
59 views

Terminal And Python console isn't showing Bangla

I am using Ubuntu 14.04 LTS. I can't print anything in Bengali in Python console and Ubuntu terminal! When I try to print some Bengali characters in console or try to write Bengali in the terminal I ...
5
votes
2answers
2k 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 ...
6
votes
2answers
59k views

How to find python installation directory on ubuntu

I have just migrated from Windows environment. I have installed Python 3.2 in a separate directory. How can I get the python installation path on ubuntu shell ? Is there any way I can let shell ...
2
votes
1answer
523 views

install Flask as a virtual environment whith virtualenv.py in 12.10

I am trying to follow this Tutorial to learn flask. I have never used python before and a relatively new to linux too so sorry if I am asking a very basic question. I have installed python version ...
4
votes
5answers
13k views

How to install Python package pyzmq properly?

How to install Python paackage pyzmq properly? I searched in Synapic package manager in vain.
2
votes
1answer
17 views

How to retrieve screenshots of a package in ubuntu

i'm developing an application which manipulates packages in ubuntu. I'm working with python. I need to retrieve screenshots of packages by using package-name. For example, say that package-name is ...
1
vote
1answer
104 views

I can't open software updater and unity tweak tool on Ubuntu14.04

I have a notification nearly every time I try to update. That note 'An error occurred while checking for updates => [TR Language] Güncellemeler denetlenirken bir sorun oluştu.' I can't open software ...
5
votes
1answer
2k views

reliably restarting services using upstart or runit

I want to reliably restart my app and web server processes on crash. If I understand correctly, runit starts every service as a child process. If the child process crashes this sends a signal to the ...
-1
votes
3answers
139 views
1
vote
1answer
488 views

Update Manager doesn't work “ImportError: No module named 'codecs'”

Hello, Dear awesome community Each time I try sudo update-manager it returns Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File ...
10
votes
3answers
8k 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
234 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
231 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
11k 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
27 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
4k 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 ...
0
votes
2answers
315 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
47 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 ...
0
votes
1answer
47 views

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

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
40 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
69 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 ...
0
votes
1answer
869 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
49 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 : ...
1
vote
1answer
4k 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
3k 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
169 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 ...
28
votes
2answers
25k 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
68 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
vote
1answer
30 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
1answer
32 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
4k 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. ...