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
2answers
4k views

What does “.bashrc or prepend the Anaconda install location” mean?

I installed Anaconda from root, after completion of installation this message was displayed on terminal screen: Python 2.7.8 :: Continuum Analytics, Inc. creating default environment... installation ...
0
votes
1answer
35 views

How do you build a python application using snapcraft?

I'm trying for several hours, I'm getting this : Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-UWeLSq-build/ Command '['/bin/sh', '/tmp/tmpkajulyzd', 'python2', '/home/adi/...
0
votes
0answers
15 views

How can I await a coroutine using Python's exec()? [on hold]

I'm trying to figure out how to await coroutines using exec(). However, I have found no such resource online, and a quick Google search doesn't net anything helpful.
1
vote
1answer
4k views

Best way to install PyQt5 for Python 2.7 on Ubuntu 14.04

I am attempting to install PyQt5 on my Ubuntu box. I have been able to install the packages for Python 3, however,I have code that depends on pygraphviz which has a hard dependency on Python 2.7. I ...
0
votes
2answers
596 views

Errors related to installing RSeQC

I have Python 2.7.6 installed but when running a python script (RSeQC scripts) with command: $ python script.py I got errors: ImportError: No module named qcmodule or ImportError: No ...
0
votes
0answers
16 views

How to resolve errors related to installing RSeQC?

I asked a question almost a year ago. Please see my question here (Errors related to installing RSeQC). At that time I was persistently facing with errors such as: ImportError: No module named ...
40
votes
4answers
57k views

How to set up and use a virtual python environment in Ubuntu?

Python virtual environments are used to create isolated python environments to avoid dependency and version conflicts, and also indirectly takes care of permission issues. But what is the easiest way ...
0
votes
1answer
22 views

Problem in invoke sudo make install in python script

I have written the following code to configure yara package in my script, but when it call sudo make install, python give me error. How can I fix it? def yara_installation(self): os.chdir("...
3
votes
2answers
7k views

IDLE installation in Ubuntu 14.04

Does anybody know which IDLE package I should install from Software Center in Ubuntu 14.04 assuming I want to program in python 3?
1
vote
2answers
38 views

Is `sudo pip install` still a broken practice?

I'm new to Ubuntu, so please bear with me. I installed pip using this command: sudo apt-get -y install python-pip. Then I installed NLTK using the command on their website, which was: sudo pip install ...
5
votes
1answer
458 views

How can I deploy my local Juju Charm with Amulet framework?

I use amulet as testing framework for charms which we developing. I've already tried to reproduce an example, provided on https://jujucharms.com/docs/stable/tools-amulet and it's work fine. But now I'...
2
votes
1answer
106 views

How to set Python back to the original version

I made my Python default version Python 3 in Ubuntu a few months ago but I don't know how I did it. Now I am trying to install pygame and it's throwing many errors. I feel that it's because my default ...
0
votes
2answers
5k views

Python - AttributeError with hashlib: no such attribute: “openssl_md_meth_names”

I don't know why this is happening, but after some crazy recovery from installing python from source, when anything imports hashlib, it comes up with something like this error: Traceback (most recent ...
5
votes
1answer
1k views

Why '*.exe's in Python installation?

Just out of curiosity I executed following command and I was surprised to see MS Windows executables in the Python installation directory. 20:36:46 nixlap [~] $ locate -i -r exe$ [snipped] ...
4
votes
2answers
2k views

Python application has no icon in Unity launcher

I have written a Python application (with pygtk and pymozembed) which I use very often. In the Unity dash my application has an icon (as I definded in the .desktop file). But when I start it, there ...
3
votes
2answers
4k views

Unable to run python file from terminal

I am not able to run this Python file from terminal. I have added the shebang: #!/usr/bin/env python at start of the file. Am I doing something wrong? How can I run this file from terminal? ...
4
votes
3answers
581 views

VIM python support on Ubuntu 16.04

I use ubuntu 16.04. My Bim doesn't have Python support. The thing is that I installed vim, vim-gnome, vim-nox, I surfed net for hours and tried to build vim from source, I deleted some stuff like vim-...
2
votes
0answers
338 views

Python is messed up because of setuptools

I have trouble getting Python working right, after a mixup with Python setuptools. after this, I cannot run flexget and other programs without getting this error: flexget execute Traceback (most ...
1
vote
1answer
38 views

How to install Python 3.4.5 from apt?

I have Python 3.5 installed.I previously installed Python 3.4 from source and managed to uninstall it somehow. Now if I try to install Python 3.4 through apt-get install python3.4 , it returns ...
0
votes
0answers
15 views

Python problem with Let's Encrypt

When trying to use the following command to setup my certs: ./letsencrypt-auto --apache -d example.com I get this error from Python: dpkg: dependency problems prevent configuration of python-...
1
vote
1answer
2k views

python troubles on ubuntu 12.04

after a system updates I having troubles with a python based Apps The Updater-manager doesn't download the updates packages, and I realized this python trobles because I use flexget for RSS ...
0
votes
1answer
19 views

Fastest way to index an element in a sorted list in python? [on hold]

Python's lists have a function list.index(elem) which, to the best of my knowledge, run in O(n) time. However, if I can guarantee the list to be sorted, is this still the best way to get the index of ...
0
votes
0answers
18 views

Anaconda python distribution SSL error on ubuntu 15.10

I installed 32 bit version of Anaconda python distribution on Ubuntu 15.10 But every time I try to use the command "conda update anaconda" or try to create a virtual environment, I am greeted with ...
2
votes
2answers
2k views

How to use python3 in emacs on ubuntu 14.04

I am using emacs in python mode. To run a python file I use the command C-c C-c. Emacs automatically start to run python 2.7 while I would like to use python3. Once I have been able to solve ...
-2
votes
0answers
13 views

how to calculate distance & time required for traveling source to destination [on hold]

I am working on a project in python django related to TAXI I required to calculate distance & duration For taking input from user I use google-map-api. Using the api I get source & ...
56
votes
5answers
32k views

How to easily start a webserver in any folder?

I'm looking for a relatively painless way to launch a web server with document root in any folder I specify (or better yet, where I'm launching). I often try out new things like JS frameworks or so ...
2
votes
2answers
521 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 ...
3
votes
3answers
183 views

python subprocess.call() not working as expected

I started down this rabbit hole as a means to familiarize myself with how one would go about creating a setup script in python. The choice of python was simply rooted in my familiarity with it while I ...
0
votes
0answers
19 views

Help Geany meet Python modules

I am trying to force Geany 1.27 (Ubuntu 16.04) to use additional Python modules such as pandas, but it doesn't see them saying 'no module named pandas' while running code from the Geany IDE. The ...
1
vote
0answers
29 views
0
votes
1answer
19 views

installing pip with two versions of python

I have a system running an old version of default that did not support pip, I also have Python 2.7.11 I followed the steps here but whenever I run the command: python get-pip.py I receive the ...
0
votes
1answer
34 views

the package python-pip needs to be installed, i cannot find an archive for it

After all install or remove, I take "the package python-pip needs to be installed, I cannot find an archive for it" error. I've tried similiar problem's solution but didnt work. Have any idea? ...
0
votes
1answer
22 views

Python broken after 15.10 to 16.04 upgrade

After doing an upgrade from 15.10 to 16.04, my Python packages seem broken. Looks like a compilation error for python-minimal. me@me:/etc/apt/sources.list.d$ sudo apt-get -f install Reading package ...
0
votes
2answers
46 views

Python 3.5 is unable to access packages installed with pip3 like django

I have both python 2.7 and python 3.5 installed on my Ubuntu 16.04 LTS. I have also installed python3-pip to be used for installing external packages to python 3.5. Using pip3 I have installed django ...
1
vote
1answer
37 views

Use python to restart all the process

My platform is ROS Ubuntu in Raspberry Pi 2. I started a shell script by running python node to restart all process. However, when I kill the python node, everything started by the python node is also ...
1
vote
1answer
4k views

uwsgi can't find python plugin

I'm trying to deploy a python app to my Ubuntu 12.04.1 VPS running Nginx / uWSGI. I've setup my server following this guide. When I restart uWSGI I get this message: nickd@my-vps:~$ sudo /etc/...
6
votes
1answer
2k views

Alsa problems with python2.7- Unable to open slave

I am using python's module pyaudio to process sound but ALSA returns: ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open ...
0
votes
0answers
38 views

ImportError: No module named dbus

I need help urgently :( I was trying to update my Python and messed up my whole system. I am currently now able to start my software centre. I tried Googling multiple fixes but nothing helped. My ...
7
votes
2answers
209 views

Message overflow in notification bubble

I am learning how to use gtk notifications, and it seems that any output display via the notification bubble has a maximum overflow size, probably 10 lines or so. So, if the message I want to show is ...
0
votes
0answers
17 views

Running Python script in Spark

I'm running a Python script: bin/spark-submit my_script.py But when I run it I get this error message: No such file or directory I tried changing directories to the directory that contains the ...
0
votes
1answer
66 views

I can't install softwares after failed removal of Python 3 (python3-pkg-resources)

I have two python in my computer 2.7 and 3.4. I stupidly assumed that 2.7 is the default python in ubuntu and tried to uninstall python3 using this command sudo apt-get remove python3 While in the ...
0
votes
2answers
26 views

What are the actual risks of giving www-data sudo nopasswd access?

I have a server that I just installed apache on. I have a php script on the server that I would like to run a sudo command from. I've been scouring the web on why giving www-data sudo nopasswd access ...
0
votes
0answers
19 views

Getting data from a running program using Python

What i'm trying to do is get data from a running program. Basically it gives me values let's say numbers 1-10. I want to be able to "read" these numbers off my monitor. I was wondering if there's any ...
2
votes
1answer
29 views

Cancel and restart a certain Routine (python-script)

I have a question regarding a programm I run. Every once in a while, I need to restart a certain program. For that case, I usually run: screen ./run.sh arg1 arg2 "arg3" (screen, since I don't know ...
0
votes
0answers
14 views

Layouts in Qt doesn't work for me, need help

I am starting Qt player for linux and i am stuck at design. Qt(also Glade) got pretty complicated layout behaviour. So far i did this in java. I want to replicate it in Qt: The problem is that ...
0
votes
0answers
32 views

Programming a terminal web browser [closed]

After reading some python network programming and playing around with sockets, I got the idea of creating a simple terminal web browser. My question is if it is possible create a terminal web browser ...
0
votes
0answers
28 views

Miserable printing of the hindi words by python in terminal

Suppose I want to print मैं ठीक हुँ । in terminal in hindi language either by using the python with unicode or if i just copy and paste, instead of correctly pasting and printins it correctly, it ...
0
votes
1answer
28 views

HP printer install fail

I have a failed install of Hp printer at http://hplipopensource.com/hplip-web/install/manual/distros/ubuntu.html What I need help with is how do I Delete the printer software so I can reinstall. ...
0
votes
1answer
29 views

Recover python in /usr/bin

I tried to install a newer version of the python and associate with the /usr/bin folder. Hence, in the configure file of that newer version I modified initialization location from /usr/local to /usr. ...
0
votes
0answers
33 views

How to install python to /usr/bin instead of /usr/local/bin

I have a python library which needs 2.7.10 version for it to function. But, When I download the python binaries and install, it is being installed in the /usr/local/bin folder. When I run the python ...