Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

2
votes
2answers
38 views

Make python file accessible from anywhere by all users

I installed a program that requires you to execute a python script like this: python fit_locus.py --help I want to make the file acessible to all users without requiring them to navigate to the ...
0
votes
1answer
14 views

NS-3.25 PyViz visualizer install on CentOS 6.5

I'm installing Network Simulator 3.25 on a CentOS 6.5 machine. In my environment I cannot use any repository, every single packet have to be downloaded from a machine and then transferred to the ...
0
votes
0answers
9 views

bpython installation trouble

I have a problem with bpython: studio@linux:~> sudo pip install bpython==0.15 Requirement already satisfied (use --upgrade to upgrade): bpython==0.15 in /usr/lib/python3.4/site-packages ...
1
vote
0answers
296 views

Python is unable to import OpenSSL

I created a virtual env for a matrix home server installation on a shared hoster. $ virtualenv -p python2.7 /home/tristank/venv/synapse $ source /home/tristank/venv/synapse/bin/activate I installed ...
0
votes
0answers
10 views

wkhtmltopdf and pdfkit issues in python

Hello I am developing an web with python Flask in a linux server, in doing so I am trying to use pdfkit and wkhtmltopdf. I am using a linux server(ubuntu). In Putty, after logging into my server, at ...
0
votes
0answers
9 views

How to install linux-gpib Python bindings inside virtual environment?

I'm working on developing Python code to control GPIB devices, and am realizing the more I learn the less I know. So here's my question: I believe I've installed linux-gpib properly, and I have ...
13
votes
7answers
23k views

How to restart the Python script automatically if it is killed or dies

I am running my Python script in the background in my Ubuntu machine (12.04) like this - nohup python testing.py > test.out & Now, it might be possible that at some stage my above Python ...
0
votes
1answer
1k views

qmake error when installing PyQt5

I'm trying to install PyQt5 for python3 from source files. I install SIP correctly. Then when I want to prepare the make file for installing PyQt, I get this error: #python3 configure.py Error: ...
3
votes
3answers
346 views

How to use vim-slime from within a single tmux session?

I'm trying to integrate ipython and vim through a single tmux session using the popular vim plugin "vim-slime." The problem is that while I can get it to work fine provided that vim is opened in a ...
0
votes
1answer
747 views

Django can not connect to MySQL database over ubuntu 10.04

I am newbie in Django. I got a simple Django 1.3.* project, i would like to run it over my localhost. I installed all necessary modules like: python-mysqldb, rptz etc... I have ubuntu 10.04 ...
-1
votes
0answers
27 views

Python to Shell Script? [migrated]

How can I convert this simple python code to Shell script? import time import sys cur_time = int(time.time()*1000) print cur_time sys.exit(1)
0
votes
1answer
1k views

Debian Stable (“wheezy”): was trying to build Python 3.4, and I ran sudo make install — am I in trouble now?

So, I wanted to run Python 3.4.x inside a virtualenv virtual environment. I learned that the first step should be to build Python 3.4.x. I was doing so in /usr/bin/Python3.4.x (a folder I created), ...
3
votes
3answers
42 views

Sudo-like remembrance of passwords for own scripts

I have a script which requires a password for authenticating a web service. A single password for a pre-defined user will suffice, and the password should if possible be stored securely (not plain ...
2
votes
1answer
33 views

Create table with frequency of unique names retrieved from multiple .csv files

I have 32 CSV files containing fetched information from a database. I need to make a frequency table in TSV/CSV format, where the names of the rows are the name of each file, and the names of the ...
-1
votes
2answers
45 views

Where can I practice my Python and Bash scripting? [closed]

I wanted to practice my bash scripting skills and python skills and wanted a good book or a site where I can practice and get excellent skills please. Any recommendations please.
0
votes
1answer
20 views

Including milliseconds in a Script?

sudo hexdump -v -e '1/1 "%02x\n"' /dev/ttyUSB0 | awk '$1=="ed" { getline byte1 getline byte2 number = strtonum("0x" substr(byte2,2,1))+2 ...
0
votes
1answer
265 views

playonlinux crashing on Fedora 19

I installed playonlinux using the default repository and when I run the command 'playonlinux' its getting crash and prints this output Traceback (most recent call last): File "mainwindow.py", line ...
2
votes
1answer
2k views

Unable to install SciPy

I need to use the module skimage, which calls the module SciPy (I need to find contours) import numpy from sys import argv from PIL import Image from skimage import measure # Inicialization ...
1
vote
0answers
34 views

python weather script not working [closed]

i am using archlinux with openbox. I created a pipe menu with a python script to get the weather from yahoo. at the begining it worked fine, but then it stopped working. the python file: ...
1
vote
1answer
570 views

Receiving “Unable to correct problems, you have held broken packages.” after trying to install python -setuptools and python-pip

I ran "sudo apt-get install python-setuptools python-pip" but I received: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be ...
0
votes
1answer
37 views

How to replace a text in a shell executable file (.sh) using Python?

I have xxx.sh file which content is: setsid ./start-meteor.sh >> /home/farah/StudioInstallation/Studio/bricks/platform/log/databricksastro.log 2>&1 < /dev/null & I want to ...
0
votes
1answer
88 views

Start GTK apk based on Python

How to start application based on Python + Glade? startx python apk.py is not working. I can run application like Firefox from text mode: startx firefox
0
votes
1answer
785 views

RuntimeError: You need gevent installed to use this worker

I need gevent to run docker-registry but i have this error: Error: class uri 'gevent' invalid or not found: [Traceback (most recent call last): File ...
0
votes
0answers
15 views

Pip managed python extending distribution packaged modules

I am looking for recommendations on extending the python library managed by my arbitrary distribution with packages available via PPI. Basically I have been working with a distro managed installation ...
-1
votes
0answers
14 views

Get my current path using a python script as a command [migrated]

I put a python script to my /usr/local/bin to use as a command in bash. I want to use my bash working directory, but I only get the current directory where the script is executed. Is there a way to ...
0
votes
3answers
32 views

Should we let Python pip overwrite modules that were installed by RPM?

Python pip and many Python modules are provided through the CentOS Linux repos. On CentOS 7.x Linux, I can install pip and pymongo with the standard distribution package manager (yum install ...
1
vote
1answer
345 views

Modoboa 1.1.1 Deployment Errors

I tried to install modoboa follow this steps: http://modoboa.readthedocs.org/en/latest/getting_started/install.html I installed modoboa with pip install modoboa: Traceback (most recent call last): ...
1
vote
0answers
32 views

Installing Anaconda on a Chromebook

So I'm not sure if this is the right place for my question since I'm using Chrome OS, but I've put it in developer mode and opened a shell, which looks very reminiscent of a Unix shell. I've never ...
2
votes
1answer
22 views

File permissions while installing a python module

I would like to install sphinx-doc from the sources so I git clone the module then installed it with sudo python setup.py install. Using /usr/local/lib/python2.7/dist-packages/pytz-2016.4-py2.7.egg ...
1
vote
0answers
18 views

Can I do socket programming in Python on a Chromebook with Crouton? [closed]

The idea is to run a simple server on a Chromebook. Does Crouton afford that much control? I might not actually write the server in python but it'd be nice to know whether it's possible.
0
votes
2answers
49 views

python virtual environment

I have to install python package locally/globally on a machine using pip, so for I do not want to install pip on local machine. I can successfully create a new virtual environment using easy_install ...
2
votes
1answer
66 views

Systemd: How to start/stop Python script that should run in background, inside Virtualenv

On my Raspbian machine, I want a successful OpenVPN connection to my VPN provider to initiate a Python script, that persistently should run in the background as long as the VPN connection is active. ...
3
votes
0answers
30 views

DD-wrt serial messages [closed]

Since I recently bricked my WDR3600 by accidentally flashing wrong firmware with mdt I had to do some soldering to make serial work. Since the window to entering bootloader cmd was really short I ...
-2
votes
0answers
15 views

How can I make these improvements to this code [migrated]

I want to improve the code below so if the user types in an integer in the name question an error alert message tells the user to input there name again not integer. In addition how can I can a code ...
0
votes
1answer
47 views

Python psutil version conflict for Terminator on Centos 7

This issue started after latest updates installation, probably in last 2-3 days. When I try to open Terminator I get error, Traceback (most recent call last): File "/usr/bin/terminator", line 23, ...
2
votes
3answers
1k views

How can I replace bash with Python?

According to the accepted answer for this SO question: , Python can make a great bash replacement. My question then, is this: how do I go about seamlessly make the switch? I think the main thing to ...
13
votes
2answers
175 views

How do I activate Xorg record module on Raspbian?

I'm trying to automate some tests on my RaspberryPi and I'm using python's pymouse to perform some emulated clicks. On my Debian it works fine, but when it comes to Raspbian it keeps failing with this ...
1
vote
1answer
15 views

Trying to get .py scripts running through apache (mod_python) [closed]

All the tutorials say to look for <directory...> </directory>, but I cannot find this in my default 000-default.conf (on my raspberry pi). Can someone explain what I am supposed to do? All ...
1
vote
0answers
30 views

Is it normal that I need u+w to set extended filesystem attributes?

I noticed that on panfs, Python's copystat fails when the source file does not have the u+w permission bit set; setting attributes fails with Permission denied command line equivalent: (attr_set: ...
0
votes
1answer
52 views

How do I calculate the column percentage of a file?

I have a tsv file that contains some values. I want the sum of each column and total number of values and percentage values. Eg: file.tsv contains x 1 1 0 1 x x 1 x ...
1
vote
0answers
19 views

Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

When updating yum via sudo on our (Amazon Linux) server, I get the following error: Fatal Python error: pycurl: libcurl link-time version is older than compile-time version I find the following ...
1
vote
0answers
29 views

Start my webpy server using supervisor

I am trying to start my python web.py server at boot, but I am having difficulties getting it running by itself. I have a config-file like the following. It's basically the sample file with an added ...
23
votes
4answers
98k views

How to install the latest Python version on Debian separately or upgrade?

I'm still new to Linux, so I'm still trying to understand where executables and their libraries are and how to install packages, so I have Debian Wheezy 7.3 which has these Python versions: Python ...
4
votes
2answers
6k views

Installing python modules for python2.6

On my CentOS 5.8 system (el5 , 64bit), I had python2.4 after OS install and I installed python2.6 now. Now I want to install python modules using yum. But whenever I install a new python module it ...
3
votes
3answers
18k views

How to change the working directory for a shell script

I have a Python script that looks files up in a relative directory. For example: the Python script is in /home/username/projectname/. I have a file that is being called within the Python script that ...
0
votes
2answers
36 views

How to compile C Extension for Python

I am attempting to install https://github.com/lthiery/SPI-Py (on a Raspberry Pi running Raspbian) by running sudo python setup.py install This fails with error spi.c:20:20: fatal error: Python.h: No ...
1
vote
1answer
858 views

CentOs 7 Python Issue “-bash: python: command not found”

I asked this at stackoverflow, but just realized it might be best here. If I need to delete it over there or should not have posted here, please let me know. I am still new to this site. Thanks in ...
-1
votes
0answers
5 views

lp only prints blank page without fit-to-page option

I am trying to print graphs made with matplotlib and saved as pdfs. With only lp file.pdf a blank page prints. With lp -o fit-to-page file.pdf then the graph prints but its obviously the entire page ...
4
votes
1answer
3k views

Help me repair my python - I think dpkg has to be reset (very tricky issue)

first question in Unix & Linux - I really hope, someone can help... Summary (TL;DR) On my Kubuntu 14.4 (which has python 2.7.6 as standard) my python is broken after I tried to install python ...
0
votes
0answers
18 views

Terminator installed via Homebrew “Incompatible library version”

I've installed Terminator from the homebrew/gui tap, but when I ran it, it raised this error: You need to install the python bindings for gobject, gtk and pango to run Terminator. I edited ...