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

0
votes
3answers
3k views

How to add a Python module to syspath?

Hi i have a file structure like this Folder Common foo1.py TestFolder foo2.py I want to import in foo2.py foo1.py. I tried but it doesn`t work on Ubuntu: ...
2
votes
5answers
10k views

How to install Python package pyzmq properly?

How to install Python paackage pyzmq properly? I searched in Synapic package manager in vain.
0
votes
0answers
291 views

Customize gedit color theme as python idle

class Player(): My gedit used python idle theme so when i type this piece, 'class' show orange but 'Player' is black. so if i want change classname or function name's color into blue, what should i ...
2
votes
2answers
410 views

Can't find Spyder or Ipython Notebook applications after Anaconda install (xubuntu 13.10)

I installed Anaconda 2.7. I can run spyder and ipython notebook from the terminal but I can't find the applications at all from the desktop. Is there a specific place I should look? Should I just ...
0
votes
2answers
246 views

Extracting specific data in a file using regex [closed]

Following info i want to extract from a file which has different version,release date,CVE number. Can anyone show me how to retrieve that information using regex..? Release date: March 13, 2007 ...
1
vote
1answer
301 views

Extracting URL links from a File

Following code is to extract /support/security/*.html links from a file(urlfile contain about 1000 links) to urlsort file using regex,But i'm weak in regex can anyone show me how to do that...? ...
1
vote
4answers
16k views

Reading all files from a directory

Following code is to read all files in download directory,but when i execute this code it won't print(display), what is wrong with this code..? import glob path = '/home/mypc/download/*.html' ...
2
votes
1answer
2k views

How to pass url as variable to wget..?

I am trying download a page using wget by passing variable which holds url using python,but it didn't work. url=http://www.example.com/support/security/ os.system("wget -P download url") can ...
2
votes
1answer
12 views

PDF viewer that can be controlled programmatically (via dbus, pipe, etc)?

Is there a PDF viewer that I can control from a Python program, via dbus, a pipe, or something similar? I have a program for presentations that displays my own notes while displaying a PDF on a ...
0
votes
1answer
21 views

Compiling vim with python support on ubuntu 14.04, no errors and no support

I'm trying to compile vim with support for YouCompleteMe as per the github guide [redacted because no reputation] and I'm having strange results. Vim compiles correctly as best I can tell and doesn't ...
1
vote
1answer
13 views

Which Ubuntu package provides the pypi future package?

Which ubuntu package would correspond to the following package at pypi: future (not futures or concurrent.futures) https://pypi.python.org/pypi/future ...
0
votes
0answers
19 views

How to exit from uwsgi server process

I'm trying to set up uWSGI for django using http://adambard.com/blog/start-to-finish-serving-mysql-backed-django-w/ and the tutorial at ...
-3
votes
1answer
33 views

i was running a python script on my pc in ubutntu and i am getting the following error. How do i solve it? [on hold]

root@vlead-HP-15-Notebook-PC:/home/vlead/Desktop/dataservice/src# python app.py * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): ...
-1
votes
0answers
16 views

Warning in python setup.py develop? [on hold]

Facing this following problem in middle of python setup Running argparse-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EfUHc4/argparse-1.3.0/egg-dist-tmp-A84z7I warning: no ...
4
votes
2answers
300 views

Python.h found by locate but not by GCC

I just wrote a simple C executable to check if Python.h is working or not #include<Python.h> #include<stdio.h> int main() { printf("this is a python header file included programm\n"); ...
-1
votes
0answers
25 views

I ran into this error( No module named '_sqlite3')

I have searched every forum for three days but i haven't found a working answer please i need help on this. I am currently doing the introductory django tutorial and when i tried to run "python ...
0
votes
0answers
22 views

error: Idle Subprocess didn't make a connection. Either Idle can't start a subprocess or personal firewall software is blocking the connection

When i run idle it returns the above stated error. It happened after I installed python 3.4. both 2.7 and 3.4 are giving this error.
1
vote
1answer
91 views

How to replace tk8.6 with tk8.5?

The title explains pretty much all I need to do. I need a downgrade from tk8.6 to tk8.5 on 14.04. There is some niche scientific python based software that I need to use, however it is incompatible ...
3
votes
1answer
349 views

pyvenv still broken on 14.04.1?

meow@te:~# pyvenv-3.4 v Error: Command '['/meow/v/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 I thought it was fixed. I've done update and ...
-3
votes
0answers
15 views

Nltk web2py python grammar checker code [on hold]

I am trying to implement a python grammar checker on web2py. I already have the part of the code that needs modification. What I need is a code that can highlight text on the searched words that need ...
0
votes
4answers
41 views

I need help running python on my ubuntu

I need help running python in ubuntu I can run python without a problem in my terminal but when i create a .py file i cant get it to run help me
0
votes
0answers
24 views

What are some ways to start out coding games in Python? [closed]

I'm looking to create a 2D RPG similar to Final Fantasy 5 and 6, but I don't know what my options are. Please list instructions as well if possible, as I am a novice with Ubuntu. I am learning ...
0
votes
1answer
30 views

Can't get IPython to start: “ImportError: cannot import name start_ipython”

I'm trying to start IPython from the terminal. I input: ipython into the terminal and I get this output: Traceback (most recent call last): File "/usr/local/bin/ipython", line 4, in ...
2
votes
1answer
93 views

Trying to run a .py script in terminal, but i get this error

#!/usr/bin/python2. import os import sys import subprocess from PyQt4.QtCore import * from PyQt4.QtGui import * import socket import struct import random import string import signal import hashlib ...
0
votes
1answer
28 views

Adding git repositories to python 3 interpreter

I am working with Ubuntu 14.4 Trusty Tahr LTS on EC2. I want to use the Python 3.4.0 interpreter which is installed by default. I want to be able to be able to add git repositories to be accessed by ...
0
votes
0answers
9 views

System-wide text replacement similar to AutoHotKey

AutoHotKey has this text-replacement feature: ;bullet ::_bullet::• ;disapproval ::_dis::{U+0CA0}_{U+0CA0} ;lenny ::_lenny::( {U+0361}{U+00B0} {U+035C}{U+0296} {U+0361}{U+00B0} ) I am trying to ...
0
votes
1answer
45 views

How to set python 3 as default interpreter in ubuntu 14.4

I am working with ubuntu 14.4 LTS on EC2. I want to change the default python interpreter from python 2.7 to 3.4.0 which is installed by default. When I do: /home/ubuntu$ which python ...
0
votes
0answers
4 views

Is it possible to use the keyring with Ubuntu Server

Is it possible to use the keyring features with Ubuntu Server? I'm implementing the following Python package and it falls back to base64 encoded filesystem storage because there is no secure storage ...
7
votes
3answers
12k views

easy_install pygame not working due to “linux/videodev.h: No such file or directory” error

Trying to install pygame through easy_install in Ubuntu 12.10 and the errors it gives me this: Continuing With "setup.py" warning: no files found matching 'readme.txt' no previously-included ...
11
votes
3answers
302 views

Is there a Perl or Python script I can write which can minimize the Gnome terminal window?

I'm on Ubuntu 14.04 with the old-style GNOME setting from the GDM. (I don't like the new Unity interface.) Is there a way I can create a command that I can type in my terminal window to minimize it? ...
0
votes
0answers
13 views

Always receive same Install Error

I'm trying to install visual python by running the following line on bash: sudo apt-get install python-visual Then I receive the following error: Errors were encountered while processing: ...
1
vote
0answers
33 views

Running Python script in Abaqus in Ubuntu

I am running a python script through the scripting interface in Abaqus. It's a basic script that writes a value from each element from the abaqus simulation into a a text file. The text file is then ...
0
votes
2answers
34 views

I have at least 4 python interpreters on my PC, now what?

My ubuntu is 14.10, and I have upgraded it from 12.10 I think. I just realized there are at least 3 python interpreters on my machine. For a mooc, I have installed a fourth one, Enthought Canopy ...
13
votes
6answers
934 views

How do I check whether a module is installed or not in Python?

In terminal, after I start Python, how will I know what are the modules present in python? Suppose I need to learn the modules NumPy and SciPy. How will I install it if it is not installed? How ...
3
votes
1answer
2k views

Typing commands into a terminal always returns “-bash: /usr/bin/python: is a directory”

I think I messed something up on my Ubuntu server while trying to upgrade to Python 2.7.2. Every time I type in a command that doesn't have a response, the default from bash is this: -bash: ...
3
votes
2answers
2k views

Installing pyusb on ubuntu 13.10

I tried this link, but got the following message on shell: sudo apt-get install python-pip : vineet@vineet:~$ sudo pip install --upgrade pyusb Downloading/unpacking pyusb Could not find a version ...
0
votes
0answers
19 views

Error in Installing RevKit

@ubuntu:~$ sudo apt-get install build-essential cmake python-dev ipython python-qt4python-numpy Reading package lists...Done Building dependency tree Reading state information...Done Package ipython ...
0
votes
1answer
31 views

Change default python version in idle

So, I'd like to have Python 2.7.6 when I open the idle (that is the one pre-installed on Ubuntu); instead, the idle opens with the one that I have installed (2.7.5). How can I do that?
0
votes
0answers
23 views

E: Package 'python-numpy' has no installation candidate

When running sudo apt-get install python-numpy I am getting this error : Reading package lists... Done Building dependency tree Reading state information... Done Package python-numpy is not ...
1
vote
2answers
1k views

Tkinter on Ubuntu 14.04 seems not to work

I receive following Traceback: Traceback (most recent call last): File "tkinter_basic_frame.py", line 4, in <module> from Tkinter import Tk, Frame, BOTH File ...
7
votes
2answers
6k views

How do I set IDLE as the default editor for Python scripts?

I would like to set IDLE as the default editor for python scripts, but when I click on "open with application" and hit the dropdown to show more applications it isn't an option. Here's exactly what ...
1
vote
0answers
22 views

If you install anaconda, how can you inactivate the anaconda environment?

I'm currently using Anaconda to get access to a "standard" set of packages on nearly any platform. The issue is, on the linux side of the house, my current approach is to tell the installer to ...
0
votes
0answers
27 views

AttributeError: 'module' object has no attribute 'samples'

I have code: from ceilometerclient.v2 import Client as ceil_client from keystoneclient.v2_0.client import Client from ceilometerclient.v2 import ceilometer query = [{'field': 'timestamp', 'op': ...
2
votes
1answer
4k 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
3answers
1k views

Problem with installing IPython on Ubuntu 14.04 LTS

When I used pip install ipython or pip install "ipython[notebook]" I get the following error: Downloading/unpacking ipython Downloading ipython-2.3.1-py27-none-any.whl (2.8MB): 2.8MB ...
3
votes
3answers
8k 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 ...
0
votes
0answers
44 views

PyKEP: python 2.7 vs python 3.3

I try to install PyKEP package (pyKEP) and following the instruction in the web page at the and I obtain this error massage: [ 95%] Building CXX object PyKEP/core/CMakeFiles/_core.dir/core. ... ...
12
votes
6answers
23k views

How do I install Python Pandas?

I'm trying to install Pandas (python package) on Ubuntu. I can't find it in the repos. Is there a package repo for this or do I have to install from source?
0
votes
3answers
3k views

apt-get ends up with errors after nvidia 331 installation

I recently installed nvidia-331 driver via Software & Updates -> Additional Drivers tab. Now when I use: sudo apt-get install <package> or sudo apt-get remove <package> ...
0
votes
1answer
46 views

How to install python-gpgme ubuntu 14.04

I installed Dropbox but when I run it. I get an error saying: In order to use dropbox you need proprietary daemons. Install python-gpgme. Then, I headed over to installation of that python module ...