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

-2
votes
0answers
15 views

Equal Dictionary Values

This my code s = ["Apple" , "orange", "mangoo" , "Tomato" , "grape"] dict = {} x = """ 1. apple 2. orange 3. mangoo 4. tomato 5. grape """ print x while True: b = int(raw_input('what do u ...
0
votes
1answer
24 views

Unix crypt function syntax error [on hold]

I'm getting this syntax error: it's pointing to the python label in line 1. ./cracker1.py: line 1: syntax error near unexpected token `(' ./cracker1.py: line 1: `Python 2.7.10 (default, Oct 14 2015, ...
1
vote
2answers
84 views

How to run a script from terminal [duplicate]

Hi I would like to run a script from the terminal, is there anyway to do that? For example : if I have a python script I would normally run it with this command : python script.py How can I run ...
51
votes
6answers
64k 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?
-1
votes
0answers
7 views

I was installing virtualenvwrapper for python purposes, I am getting troubles with the last two lines of the code. HELP

$ sudo pip install virtualenvwrapper $ export WORKON_HOME=~/Envs $ echo 'export WORKON_HOME=~/Envs' >> ~/.bash_profile $ echo 'source /etc/bash_completion.d/virtualenvwrapper' >> ...
8
votes
1answer
13k views

How to install pip (python) to user without root access

Right, fairly new here but here goes: I'm trying to install pip (python installer) to my username since I don't have root privileges and can't just sudo apt-get install python-pip. So what I've ...
0
votes
0answers
35 views

Not able to download nltk package [on hold]

I am downloading the nltk package but it is getting stuck in between with following error message: [nltk_data] | Error downloading u'panlex_lite' from [nltk_data] | ...
0
votes
0answers
20 views

How to install a python script as an application

I have been trying to create a deb package for my python script following these steps. My myscript.py contains a simple frame. #!/usr/bin/env python import wx app = wx.App(False) frame = ...
3
votes
2answers
13k views

how to update python version on ubuntu 14.10

I'm trying to figure out what version of python i have installed, and also upgrade it to the latest. When I go to a command prompt and check, it looks like I have an old version of python installed. ...
5
votes
2answers
997 views

Error: PyQt5 requires Qt v5.0 or later

I want to install PyQt5 on Ubuntu 14.04.2. Once downloaded and uncompressed, I run python configure.py as it is mentioned on the previous link. However, it asks me to install QT 5 or later. Which ...
-1
votes
0answers
7 views

Web Scraping with Django

I'm learning python and i would like to develop webapps after a small research i found that Django is all i need to develop a webapp or website using python. My idea is to develop a website that ...
12
votes
2answers
14k views

Install python 3.5 on vivid using apt-get

How can I install Python 3.5 on 15.04 Vivid using apt-get? Obviously I realise I can install Python 3.5 using the source tar ball, however I would prefer not to install from source and instead use ...
4
votes
1answer
390 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 ...
1
vote
2answers
55 views

parsing `/etc/passwd` file to find users with Interactive shells

I want to parse /etc/passwd file to find out if the user can run interactive shell. I know the 7th field in each line of /etc/passwd file tells the path of shell. But How do you say that, defined ...
0
votes
1answer
35 views

Proper way to install latest version of Python on Ubuntu

I'm trying to set up a Python development environment on Ubuntu 14.04. I wanted to install the latest version of Python 2 (2.7.11) alongside the OS version so I followed the instructions here: How to ...
-5
votes
0answers
27 views

Problem with `make` [on hold]

/bin/mkdir -p '/usr/local/lib/python2.7/dist-packages/gruel/pmt' /bin/sh ../../../libtool --mode=install /usr/bin/install -c _pmt_swig.la '/usr/local/lib/python2.7/dist-packages/gruel/pmt' ...
1
vote
2answers
813 views

DBus nested dictionary in python

I have dictionary like this {key: { key1: '', key2: [{ key3: '' }] }} I have tried a{sv}, but I got error: **to message with signature a{sv}: <type ...
1
vote
2answers
936 views

Importing a Python module works from command line, but not from PyCharm

My default Python binary is set to the one with the Anaconda distribution of Python. This is found at /home/karnivaurus/anaconda/bin/python, and I have made this the default by adding to my .bashrc ...
0
votes
0answers
13 views

how to run grais, some kind of python program?

I built the gnu radio 3.7.9 from script here https://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGRFromSource I built gr_ais ...
0
votes
0answers
6 views

Lost code after uninstalling the open cv in python.. how to recover? [on hold]

Lost code after uninstalling the open cv in python.. how to recover? Does anyone knows about it?
1
vote
1answer
44 views

Sudo execute command in Pythonscript

I want to sudo a command from a pythonscript without hardcoding my password in it. The Pythonscript is part of a webservice on Apache2. Since it is part of a webservice, asking the user each time for ...
1
vote
4answers
2k views

Openshot 1.4.3 no longer recognising blender when making animated titles

I was using openshot and blender to create some animated titles and it was working fine until openshot just started to cry out for blender for no apparent reason. The previews work fine, and some ...
0
votes
0answers
21 views

Screwed up system python in Ubuntu, any way to repair it?

(originally posted on stackoverflow) While trying to update my python version, I accidentally screwed up my python installation on Ubuntu 14.04 (the system installation, the one in /usr/lib). Now, I ...
1
vote
0answers
40 views

Broken python after installing python and cannot run sudo apt-get upgrade

When trying to run python I get this error: $ python Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting ...
0
votes
0answers
11 views

service [sname] restart not working like I expect

I am having some trouble getting gunicorn to run from a python virtual env and this is the only thing I can see that proves what is wrong right now... description "Gunicorn daemon for Django project" ...
1
vote
0answers
18 views

Why do I get two RandR errors each time I run the xrandr commands?

I'm in the process of creating an xrandr GUI frontend, but I keep running into randr errors. When I run the xrandr --newmode command, I get a BadName error. Running the xrandr --addmode command after ...
1
vote
1answer
204 views

Installing python 3.x on Ubuntu 15.10

I have already python 2.7 on my machine. I can't recall if I installed it or it is a built-in install. Anyhow, I would like to install work with python 3.x and I wonder if I need first to uninstall ...
0
votes
0answers
17 views

Upstart: Logging output of python to log file

I have an upstart script that I want to launch and log the output from. I can launch it successfully and it completes :) Output goes to my log file after the program finishes. However: The ...
1
vote
2answers
632 views

How to set up gcalcli?

I found this Linux Journal article and really would like to get gcalcli working on my PC. I tried both installing from source, as per article and from Ubuntu repository sudo apt-get install gcalcli. ...
3
votes
0answers
27 views

Software Center doesn't start - could not initiate dbus

Ubuntu Software Center is lost from my Ubuntu & it's not showing in launcher. When i run sudo software-center in my terminal, the output is something like this: 2016-01-29 17:46:53,262 - ...
0
votes
1answer
32 views

pip upgrade not working

I am trying to upgrade pip from version 7.1.2 to 8.0.2 But I am not able to upgrade it due to some errors. I ran the following command. user@ubuntu:~/devstack$ pip install --upgrade pip I am ...
0
votes
0answers
10 views

i'm trying to install iou and i got thist error

i tyring to install (IOU) with GNS3 so i need to (fix the missing library for IOU on 64bit systems ) and when typing this: dpkg --add-architecture i386 && apt-get update && apt-get ...
1
vote
2answers
65 views

Missing write permissions in home/user/anaconda2

I am trying to install opencv using the command conda install opencv This command worked on my laptop, but i am getting following error when I try it on my desktop computer. Both systems are ...
-3
votes
0answers
33 views

Using Python LINE api to send message getting following errors [closed]

File "<pyshell#1>", line 1, in <module> client = LineClient("*******@****.com", "*****") File "line/client.py", line 88, in __init__ self.login() File "line/api.py", line 148, ...
-2
votes
0answers
13 views

encoding issue in python3.4 \u2014 under windows [closed]

I have em dash character in my code (\u2014) to split a line in a certain txt file with open(path, 'r') as r: number = r.readline() num = number.split(' — ')[1].replace('\n',' — ') It ...
0
votes
1answer
358 views

cudamat test exception: error initializing CUBLAS

I've installed nvidia drivers ,cuda and cudamat. When I run test_cudamat.py, It gives me this exception: cudamat.CUDAMatException: error initializing CUBLAS: (err=-2) I tried adding libcublas.so ...
0
votes
1answer
20 views

How can I scan all connected USB drives for a file?

I have an install of Ubuntu and I would like to run a script (bash, perl, python, whatever) that will scan all connected USB drives and report if it finds a text file. Could anyone guide me on how to ...
1
vote
0answers
15 views

App/Script consumes too much memory. Ubuntu may be killing it. How do I verify/check this assumption?

Hosted on Digital Ocean Ubuntu 14.04 1GB RAM, 30GB HDD I am running a python script that is reading a 200MB+ file line by line. Each line is parsed into a JSON object and then appended to an ...
0
votes
1answer
11 views

Postgres pg_hba.conf Configuration

I'm trying to develop a python application using Postgres. Unfortunately everytime I do a db.session.commit() I get this as an error: OperationalError: (OperationalError) fe_sendauth: no password ...
1
vote
1answer
32 views

python packages not updating with pip

I'm a bit confused about sudo apt-get install python-<package> vs sudo pip install vs pip install. I have read many posts on the matter: What are the risks of running 'sudo pip'?, Is it ...
0
votes
1answer
164 views

apt-get install python-xxx vs pip install

I'm still trying to understand this problem I'm having and have read a ton of posts regarding sudo apt-get install python-XXX vs pip install, and I understand the jist of it (apt-get is a package ...
0
votes
0answers
11 views

Owner status of directory reverting

I use Ubuntu 64 bit, version 14.04 LTS. I have 2 users on this machine, user1 and user2. Both users are part of the same group. I run a python script that logs something in a file, that is within a ...
0
votes
2answers
4k views

Sending UDP packets with `logger` command

I have couple different solutions for running custom syslog server (based on https://gist.github.com/marcelom/4218010). The problem I am facing is that the following command does not send UDP packets ...
0
votes
0answers
48 views

add-apt-repositories isn't working

Basically the terminal freezes for a while the I manually have to ctrl+c to end the process, then I get the following ^CTraceback (most recent call last): File "/usr/bin/add-apt-repository", line ...
-1
votes
1answer
54 views

python-gi referencing wrong headers [closed]

I'm trying to use gtk+ with python in Linux Mint 17. After trying the jhbuild method of building the gtk libraries for python, I tried to install from the Debian repositories and I tried to install ...
1
vote
0answers
15 views

Error starting ipython?

When I start ipython, the following error gets printed in the screen: [TerminalIPythonApp] ERROR | Exception while loading config file /home/cossio/.ipython/profile_default/ipython_config.py ...
4
votes
2answers
349 views

Error installing matplotlib

I got the following error while trying to install matplotlib using pip under Ubuntu 15.04 (Python 2.7.9). Traceback (most recent call last): File ...
0
votes
1answer
52 views

Update Python 2.7 to latest version of 2.x [duplicate]

My version of python2 on my ubuntu 14.04 machine is Python 2.7.6, how can I upgrade it to the the latest version of Python 2.X. The latest is currently 2.7.11. I have tried apt-get update/upgrade, ...
0
votes
0answers
24 views

scipy is installed, but import scipy fails

This command shows scipy installed (I used apt-get). $ apt-cache policy python-scipy python-scipy: Installed: 0.13.3-1build1 Candidate: 0.13.3-1build1 Version table: *** 0.13.3-1build1 0 ...
0
votes
1answer
23 views

Terminal blank and not executing commands

I have been trying to set up a Python virtual environment with Django and pip on my Ubuntu VM through the terminal using these guidelines. I last logged out of the terminal after trying to install ...