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

1
vote
1answer
29 views

BASH->Python (2.6) piping

I need to translate this line of Bash into Python: sample1=($(/bin/cat /proc/meminfo | egrep 'MemTotal|MemFree|Cached|SwapTotal|SwapFree|AnonPages|Dirty|Writeback|PageTables|HugePages_' | awk ' { ...
1
vote
2answers
874 views

How to use Python like Windows? [duplicate]

For example , I write a Python program by vim , but how can I run it ? It just show a editor program when I double tap on it .
2
votes
1answer
20 views

Problems installing Numpy in Virtualenv

I have numpy installed globally (I think via Django) but I'm trying to install it within a virtualenv. When I run pip install numpy (within my virtualenv), it gets stuck at Running setup.py ...
1
vote
1answer
14 views

Establishing compute node problem faced off

I am going to establish a compute node on a Ubuntu virtual machine. following these steps as written down: configure a compute node I am stuck on apt-get install nova-compute-kvm python-guestfs I ...
1
vote
0answers
24 views

Where to obtain ipython kernspec for Python 2.7

I'd like to work with Python 2.7 using Jupyter, but it doesn't come up as an option when I click to create a new notebook. I read that I need to install the ipython 2.7 kernspec file, but I get this ...
1
vote
1answer
15 views

Message- Cannot find installed version of python-jgango or python3-django

I'm new to Ubuntu, and I love it so far. I have been trying to install Django for a website development project. In the terminal, when I start the python interpreter and type import django ...
0
votes
0answers
19 views

How to install python-dev - without using apt-get - on ubuntu 12?

The question is pretty descriptive as it's noted. I'm at a working environment that I have not much access over. I have wget and curl, but I can't find any resources.
0
votes
2answers
36 views

How can I install chainer-cuda-deps?

I am attempting to install chainer-cude-deps. When I try to install (sudo pip install chainer-cuda-deps), I get the following error: In file included from src/cpp/cuda.cpp:1:0: ...
0
votes
0answers
23 views

python pip broken on ubuntu

My pip is not working anymore. Here is the output for a sudo pip install pyjs : File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File ...
0
votes
0answers
17 views

Python Script Stopping My Computer From Shutting Down Properly

I have the following line in my /etc/rc.local file. python /home/my-sickbeard-install/SickBeard.py 2>&1 >/dev/null & Since using this line, when I shutdown my computer I get an error ...
0
votes
1answer
40 views

Run Python script with root privileges (not from terminal)

How can I run a Python script which, upon execution, brings up a dialog prompting the user for his root password - so that the script is run as root, being able to make changes to files within the ...
1
vote
1answer
19 views

i want install Keyboard Layout Editor on ubuntu 15.4 , but i get errors :(

when i want install Keyboard Layout Editor on ubuntu 15.5 i get some problem.... i followed this Installation guide: Keyboard Layout Editor git clone ...
1
vote
1answer
24 views

Upgrade python packages with pip: use “sudo” or “--user”?

I have a question about installing/upgrading Python packages using the tool pip. I can either run sudo pip install -U PACKAGENAME or pip install -U PACKAGENAME --user What is the difference ...
1
vote
1answer
19 views

Why is the python built from source is still showing the wrong version?

So I've downloaded the most recent tar from https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz, untar'd, configured, built and installed to a user directory. I've also used those ...
1
vote
2answers
44 views

Terminal and Python relationship

How is the Terminal in Ubuntu and Python programming connected? Can we use Python to control the system in Terminal? I am a complete newbie,so please guide, I installed Ubuntu out of sheer enthusiasm ...
0
votes
1answer
49 views

New line in python script creating EOL error [closed]

I'm creating a Python program for Ubuntu, and I need to write a python script into a file, but the \n in the code creates a new line in the file, it isn't copied as \n, so I get an EOL error. This is ...
0
votes
0answers
19 views

setup error in terminal: pythonpath is empty

I am trying to install the odoo package for development here I download the zip file, unpack and cd to the directory. It contains a setup.py file so I run. sudo setup/redhat/install.sh but ...
2
votes
1answer
38 views

Will I be able to run Java, C or Python natively in Ubuntu Phone as I would on a PC?

the Ubuntu Phone by Meizu is released tomorrow for the European audience. I've been looking around for information on it, but the only I can find are some hand on reviews, that don't answer the most ...
0
votes
0answers
38 views

Dependency issues after reinstalling python

For a project I am working on, I decided to reinstall the Python libraries and includes so I did sudo apt-get remove python3.4 then sudo apt-get install python3.4. After doing this I resolved my ...
0
votes
4answers
62 views

matrix operation in bash [on hold]

the point is that I woul need to transpose a large file - 1600 times 80k but the entries are not tab delimited but just U and K so it looks like UUUUTTTUTUTUUUTUTUT TTUTUTUTUUTUTUTUTUT is there a ...
0
votes
0answers
32 views

Adding a file to startup list using terminal

I have created a short bash script that I want to run on startup. Adding it to the startup list through the GUI is simple enough, but I need to do it through the command-line, as I plan to access the ...
0
votes
1answer
13 views

How to Extract parameters from captured beacon frame

So I was able to extract the SSID and Mac Address from the captured Beacon Frame stored in pkt. I used scapy library's sniff function to capture the beacon frame. I did this to capture the mentioned ...
1
vote
1answer
14 views

Running Google App Engine on Ubuntu 14.04.2

I recently switched from Windows 8.1 to Ubuntu so please forgive me if this is a stupid question. I'm new to all this. So I have python 2.7.6 installed and I tried to get Google App Engine working, ...
0
votes
1answer
20 views

Error while installing python

While installing python 3.4.2 am getting error like Ignoring ensurepip failure: pip 1.5.6 requires SSL/TLS on ubuntu 14.04 .slove and give me guys please
0
votes
0answers
17 views

Returning a value using Tkinter

I would like the class to return the values 1 or 0 based on the the button selection. This code gives me an error. AttributeError: option_box instance has no attribute 'option' from Tkinter import ...
0
votes
2answers
56 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 ...
1
vote
1answer
25 views

NLTK, installed in python 2.7 but not working in python 3.4

I just installed nltk when my default python was the 2.7 version, now when i open the python3 (3.4 version), i cant import nltk, is there any solution to this, to make nltk available for both versions ...
1
vote
2answers
42 views

Error while sniffing packets using “SNIFF” in “SCAPY” (python)

I wanted to sniff beacon frames from the wireless network. I installed scapy and set the wlan0 to monitor mode. then in terminal, - I entered Scapy command to open scapy. Then in Scapy, I put: ...
1
vote
1answer
27 views

Python NameError: gloabal name 'resolution' is not defined

I'm working on developing a python application for Ubuntu that enables a user to have their desired resolution without requiring graphics drivers. In order to do this I've been using xrandr. However ...
0
votes
0answers
14 views

Psycopg2 can't commit to a local database [closed]

I've got a postgresql database on my local machine. I'm trying to write a python script, for use on many machines, that will query system information and then store it to a database, called ...
3
votes
2answers
53 views

How can I list connected monitor(s) with xrandr?

I'm working on developing a python application for Ubuntu that enables a user to have their desired resolution without requiring graphics drivers. In order to do this I've been using xrandr, which so ...
1
vote
2answers
212 views

Why is python-pip kept back in Ubuntu 14.04?

When I upgrade these days, I get this message: $ sudo apt-get upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done ...
0
votes
0answers
12 views

How to run a script between login(entering password) and being logged on(showing desktop)?

Is there a way to execute a script when a specific user logs in; after they enter their password but before they are actually presented with the desktop? The script in question may lock the computer ...
0
votes
0answers
30 views

IDLE missing from Ubuntu

I just installed ubuntu into my 8G pendrive in a Lenovo laptop. With the terminal I could go to Python command line but it says there's 'no IDLE package.'
0
votes
1answer
12 views

How to install wit.ai and pywit with pip?

Wit.ai is https://wit.ai/getting-started The installation instruction is as follows: https://wit.ai/docs/python/1.0.0/quickstart But i couldn't install it sucessfully, I've tried: alvas@ubi:~$ sudo ...
1
vote
1answer
28 views

launch ipython but not like root

ipython is launched like root (UID); ok, but I need that after ipython cann't run and don't allow, script/code that can gain root privilegies. eg I launch ipython, ok the UID is root. And in my ...
0
votes
1answer
32 views

(Python) Spyder not starting

for some reason my Python IDE spyder isn't working anymore. When trying to start it, it does not open. Trying ~$ spyder in the console gives to following error: Traceback (most recent call last): ...
0
votes
2answers
34 views

Revert python installation

I am using ubuntu precise. Python version installed on this version is 2.7.6. But Cloudera expected 2.7.3. I just followed this. Entire system became non-functional. I couldn't even able to install ...
0
votes
2answers
35 views

How to reset python path to /usr/bin/python?

I was following certain instructions to install a package and ended up installing another version of python and creating symbolic links (the names I can't recall). Now when I hit python from terminal, ...
1
vote
1answer
18 views

upstart starts python script but it behaves unexpectedly

The program works when started by cron or from the shell. But when started by upstart, it seems to loop indefinitely. The scripts and the files they use are in the /home/user/ directory, and are ...
0
votes
2answers
86 views

Python 2.7 matplotlib provides error?

import numpy as np import matplotlib.pyplot as plt provides the error Traceback (most recent call last): File "/home/flyveren/PycharmProjects/Udemy/Array_Processing.py", line 2, in <module> ...
1
vote
1answer
19 views

Remove separate version of Python 2.7 after install

I was trying to install a separate version of python 2.7 (2,7.10) on my ubuntu machine - the idea was to run them seperately, but when I installed it from source, it became the default version. I ...
-1
votes
2answers
47 views

Strange behaviors in adding integers from Python script [closed]

This python script is adding the sums of the numbers entered in a single line delimited by space except that it is not adding correctly. Thanks in advance. Print "Enter Numbers:" ...
1
vote
1answer
46 views

How to install simplegui using terminal?

I am currently learning Python at Coursera, where we use simpleGUI (Hit play on top left) to creat intractive games. So, I wanted to use it on my machine. I found YouTube video installing simpleGUI ...
0
votes
1answer
19 views

Extract all files from a .tar.gz after wget and rename them

Is there any easy way extract all files from a .tar.gz and rename the files upon extraction? The tars inside look like: file1.obj file2.xr file3.ty file4.hjg All files are different extensions, but ...
0
votes
0answers
22 views

Ubuntu server cannot install anything [duplicate]

Recently I tried to install the ubuntu desktop on my ubuntu server 14. The installation failed hard. I tried several things fixing it and did a lot of research. But I couldn't find anything helpful. ...
0
votes
1answer
33 views

Syntax highlighting for Python in gedit

I'm using the default setting. I'm looking for a simple legend that says 'this color means that' or 'comments are blue, functions are green', whatever. I'd think the need for this would be painfully ...
0
votes
0answers
14 views

Installing GEOS on ubuntu without root rights

I tried installing the GEOS API for Python and got the following error when I entered commands from GEOS dir: ./configure --enable-python make make install Giving the following error SWIG is ...
0
votes
0answers
43 views

How to uninstall uwsgi?

I've made a mess of my uwsgi installation, and I'm trying to clean it up and start over. I don't remember how I installed it, so I did both: $ sudo apt-get remove uwsgi and $ sudo pip uninstall ...
0
votes
0answers
39 views

apt-get problem after having removed Python2

I'm quite a newbee. I installed Python2 and Python3. I got bored of Python2 and decided to uninstall it, if i remember well by sudo apt-get remove python2 but now, everytime i use apt-get , i get ...