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

learn more… | top users | synonyms

-2
votes
0answers
14 views

python error name not defined [migrated]

I am following https://www.analyticsvidhya.com/blog/2014/12/image-processing-python-basics/ to practice image processing. I am writing the code in an incremental way and checking if everything goes ...
-1
votes
0answers
5 views

Error in setting environment for image processing [on hold]

I am following https://www.scipy.org/install.html to install the required packages to practice image processing using python. I have received the following error (see attached image) during the ...
1
vote
1answer
17 views

running portable python3 under wine

Installing python under wine generally means running a graphical installer, but I don't have that option, so instead I download Windows x86-64 embedded zip file from Python 3.6.0 and unpack it. ...
0
votes
0answers
17 views

TypeError running a Python script [migrated]

When I try to run this Python script, the following happens: $ python mlp_training.py Loading training data... (0, 38400) (0, 4) Loading image duration: 0.000199834 Training MLP ... Traceback (most ...
1
vote
2answers
27 views

Path Variable and script's shebang will not run correct version of python

Problem Statement: A bash script is being used to create a new screen session for each name from a list of names. At every name, a python script is run using that name as an input. The bash script ...
0
votes
0answers
7 views

How to install plugins in Eclipse without sudo/root?

I have eclipse installed by admin in a Unix OpenSuse machine, but the dropins folder has only read access for me(users). Is there a way to install plugins and use it in this Eclipse by users, without ...
2
votes
1answer
28 views

Creating a systemd service for Flask via nginx

I'm running a Flask application on a server via nginx. I want to create a systemd file and here's what I have: [Unit] Description=my123 website After=syslog.target Requires=postgresql.service [...
0
votes
0answers
23 views

Setup a Python script as a service with systemd, dealing with SIGHUP, TTYs and manual service restarting [on hold]

On Raspbian Jessie I'd like to start my own service, a Python script, on tty1, and keep a login prompt on other TTYs. Problem 1: systemd sends SIGHUP after starting the service (probably when it ...
0
votes
0answers
16 views

Error in installing conedy python package (dependency libboost-iostreams)

I tried to install conedy python package from dep file. I got the following error: sudo dpkg -i sudo dpkg -i python-conedy_0.264_amd64.deb **edited** (Reading database ... 361868 files and ...
-2
votes
1answer
36 views

“Cut off” the link between the terminal and a command

I have created the pycharm command, but I have a little issue. When I execute the command, pycharm opened, but it stayed related to the terminal. I mean if I close the terminal, pycharm will ...
0
votes
0answers
22 views

How to communicate with `crontab -l` to find a certain task? [duplicate]

I have a few tasks in cron and I want to programmatically read one of them: I have a web application and I want to display the frequence of a certain task in that web application. The web application ...
1
vote
0answers
22 views

mkdosfs to format dashcam SD card FAT32 with 32kb cluster size

I am trying to write a script to reformat a dashcam SD card, as is recommended by the manufacturer. I can do this on a windows system with a simple python script, a snippet here: ... fm = windll....
0
votes
0answers
18 views

Postfix dovecot email unable to connect via my python flask app to send transaction emails

I send up a simple python flask web app on a server at ip address 123.12.123.12 and I also set up an email server at 321.32.321.32. I can send emails from the server if I run a simple python script ...
1
vote
1answer
24 views

Python script output in the wrong directory when called from cron

The script /blah/script.py has -rwxr-xr-x 1 root root permissions and ownership. The script is: #!/usr/bin/python with open('blahblah', 'w') as f: f.write('hello') With crontab -e, I tried:...
-1
votes
1answer
56 views

Bash as float calculator

I have used this to write a function that calculates floating-point numbers. mt (){ echo "$1" | bc -l | awk '{printf "%f", $0}' echo ' ' } This works great, but I was wondering if there is a way to ...
0
votes
0answers
21 views

I/O Error: [Errno 10] No Child Processes when trying pip install

I'm trying to install mysql for python and my pip command isn't working. Here's my command: pip install mysql-python Here's the output: File "/usr/bin/pip", line 9, in <module> ...
1
vote
0answers
21 views

generating git commit info with rubber (for LaTeX, Debian)

I'm using the rubber program (in Python, from Lauchpad) to process a LaTeX document (thru pdflatex called by rubber -d) on Debian/Sid/Linux (the document is some H2020 European R&D proposal). I ...
1
vote
1answer
31 views

Runnning a python script on a socket with ncat?

I want to make a python script run on a socket of server in LAN. I wrote a number guessing script and i want to make it run on socket for other clients to play with it by connecting to port (say 1234)....
0
votes
1answer
8 views

webvirt authentication

I am using webvirt in order to play with a web page and have a quick access to my VMs (qemu setup). My problem is that when I try to open a console for any of my guest domains, in the server side I ...
3
votes
1answer
17 views

how to invoke awscli from pip install?

Having installed the AWS CLI with pip install --user awscli what's the syntaxt to invoke awscli? It's listed here: thufir@doge:~$ thufir@doge:~$ pip list DEPRECATION: The default format will switch ...
0
votes
0answers
25 views

System dependencies broken after installation of compiled .deb with checkinstall

I downloaded Python 3.5.2's source code and created a .deb package via checkinstall. I followed this guide: https://help.ubuntu.com/community/CompilingSoftware After the manual installation of this ....
0
votes
1answer
26 views

Read text lines between two strings

I am writing a small text book of Problems, Electronics engineering stream, in LaTeX. It has a long list of small part files for each chapter. In this each problem is separated by LaTeX environment ...
0
votes
0answers
11 views

how to extract particular text using python [migrated]

I have one variable having value ServerC=WebSphere:cell=abc,cluster=Cluster1+WebSphere:cell=abc,cluster=Cluster2 I want only all Cluster values in another variable I am trying to use clusterN = ...
1
vote
0answers
54 views

Running a command on a new terminal window through Python

I would like to open a new terminal using any method (subprocess, etc.) through my original Python script with a following command -- ls -- and keep it minimized so it won't appear on my screen, but ...
8
votes
4answers
2k views

How to install Python 3.6?

I'd like to install the latest Python, which is 3.6 at the time of this post. However, the repository is saying that Python 3.4.2 is the newest version. I've tried: sudo apt-get update sudo apt-get ...
0
votes
1answer
16 views

How do I install an .rpm that fails with an error about an .so file not being found from Python 2.6?

When I try to install cloudera-manager-agent 5.7 from an .rpm I get an error. The error says that a dependency has not been met because yum could not find libpython2.6.so.1.0(64bit). I would expect ...
0
votes
1answer
32 views

Can Python 2.6.6 work with CentOS 7.3?

I expect to be able to use Python 2.6.6. with CentOS 7.3. If that is not a reasonable expectation, please say so. My goal is to use an .so file associated with Python 2.6.6. I downgraded Python ...
1
vote
0answers
61 views

How to fix error: “symbol lookup error: /usr/local/lib/libQt5DBus.so.5: undefined symbol”?

I was using GNS3 network simulator fine for a while & then after few days When I start GNS3 Network Simulator, it is giving out following error, not sure what caused this. $ sudo gns3 GNS3 GUI ...
1
vote
1answer
76 views

Fedora 25 Workstation : Anaconda throws Traceback error during installation

I'm trying to install Fedora 25 Workstation on Lenovo Ideapad. Using VMWare Player with 20GB HDD space, 2GB RAM, 2 Processor core. Installation goes fine till stage 2 where Anaconda tries to create ...
1
vote
1answer
26 views

python one liner + compare numbers

please advice what is wrong with my syntax ( I use it in my bash script ) export CALC=3.4373 python -c 'print CALC > 2.2' Traceback (most recent call last): File "<string>", line 1, in ? ...
0
votes
0answers
86 views

Shared library libgcrypt found in system python but not in Anaconda environment

I'd like to use the lxml.html module in python3.5. When running my system python, I can do import lxml.html successfully. When I issue the same command in an Anaconda environment, I receive ...
0
votes
0answers
41 views

sparc-sun-solaris2.10/bin/as: unrecognized option `-m32'

I try to use the ElastAlert framework for alerting on Elasticsearch. This one is built with python and I installed the required packages. But when I try python setup.py install, I get the following ...
0
votes
1answer
23 views

Python 2.7 substitute subprocess with subprocess32 [closed]

In the Python subprocess docs it has been encouraged to substitute the default python2.7 subprocess module with subprocess32. How should I do that?  Please give a detailed answer.
0
votes
0answers
20 views

what value actually gets passed to foo() when the argument “looks like an assignment” - foo(a=b) [migrated]

The crux of the question is: considering the python call: util.find_devs_with(path=device) what is actually happening (code details/extracts below)? create the variable "path", assign the value of "...
0
votes
0answers
15 views

apt-cacher-ng like service for pypi for Ubuntu Cluster

I have the following situation: I need to install mpi4py in my 32-node Ubuntu 12.04 Cluster, the problem is only master node has the internet connection (public IP), others are in local network ...
1
vote
1answer
93 views

Installing newest version of go in debian, not found by other programs

I want to install universe (python module) on my debian os. Universe needs golang1.5+. The one in the apt repositories is to old, so I installed it from the official website in /usr/bin. I can access ...
0
votes
1answer
41 views

I'm making a GUI program in python that needs to run as root right from the get go, how should I go about it? [closed]

I was thinking of calling GKSu but I understand it's deprecated. How else can I do this?
0
votes
1answer
20 views

Cron Job Ubuntu With Special Command

I need help with a cron job. I have this command python myscript.py -rss and it's working well in the terminal but not inside crontab. I have this in my crontab´: */15 * * * * cd /var/www/html &...
0
votes
0answers
32 views

Nfqueue forwarding of packets

I have computers A and B. A will ping google.com, B will act as a mitm. I run aprspoof 1 way so that B is in between A's traffic to the router but the router has a clean path to A. On B, I wrote a ...
0
votes
0answers
17 views

PyQt window closes on OK

I have a simple PyQt application launching command line scripts based on a form. I converted the *.ui file to *.py from PyQt designer and imported it into my python application. I have not modified ...
3
votes
0answers
24 views

How to run Amazon CLI “glacier” under Python 2.7 on Centos6?

On Centos 6 after installing Amazon's CLI tools using pip: # glacier vaults Result: ssl.SSLError: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify ...
1
vote
3answers
64 views

Parallel Python scripts on a remote machine

Similar to this thread, I have a remote machine with 8 cores that I want to use for running scripts in parallel (1 script per core at a time). However, I don't have multiple bash scripts but a single ...
0
votes
2answers
49 views

Monitor process and restart when not running using crontab

I have a Python / JS server combo that I need to keep running at all times. The Python server has a tendency to crash, as it's running on a server with 1GB of RAM. I've written a script called "...
0
votes
0answers
40 views

can't use apt due to encoding issue

i'm very new to python and ubuntu. Recently i was trying to run apt-get upgrade and i got this error. SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding ...
0
votes
1answer
71 views

Deleted /usr/bin/python and now the terminal doesn't run

I accidentally deleted /usr/bin/python and now I can't run my terminal - gnome-terminal. When I try to run it using XTerm it says: /usr/bin/python3: bad interpreter: no such file or directory When ...
0
votes
0answers
35 views

How can I run a script at boot that runs a program as user

I already got my script (in python) to run at start by placing it at /etc/init.d/ . This scripts will eventually start GUI with startx or RetroPie with emulationstation commands, but it won't work ...
1
vote
1answer
25 views

How to prevent closing a python app in linux?

I am working on a project that uses a raspberry pi for it's computing purposes. It has a touch screen with it that user can choose the options from it. I want to install a light linux distro on this ...
0
votes
0answers
11 views

Script not running but commands execute on terminal with python (gnomekeyring.IOError) [closed]

I am trying to unlock one keyring using the library gnomekeyring in python. I have written my script, but it throws me the error gnomekeyring.IOError. However, if I run python at the terminal and ...
1
vote
0answers
32 views

Using a custom filter via script to reject inbound email

Background & Requirements I've found a number of reference docs and Q&A post relating to this topic but I've not been able to figure out a key area of the design. I would like to reject an ...
0
votes
0answers
20 views

Special Variable in python

Perl code print "\nInput User : "; $usr=<STDIN>; chomp $usr; system ("grep ^$usr: /etc/passwd"); if ( $? == 0 ){ print "User with name $usr exist\n"; } else{ print "User with ...