Questions tagged [python]

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

Filter by
Sorted by
Tagged with
0
votes
4answers
140 views

How to install Python pip on Nixos?

I can't seem to find the appropriate package that install's pip on Nixos?
0
votes
1answer
69 views

Vapoursynth installation problems

I am trying to install SVP (SmoothVideo Project) on Linux Mint 19.1 and I am running into problems with Vapoursynth installation. When I try to do the part "Building 3rd-party apps from sources -> ...
-1
votes
1answer
27 views

How to remove leading numbers and whitespace from a document with python

I have long file with the following format. 123.I am biniyam sdfjhjkhkjsfsd \n sdfhhkjhkjhksdfl \n 14.I am in cybersecurity \n fdkjskdlfnmnjhuksnfe,h \n 872.I love soccer. \n I wanted to ...
1
vote
1answer
78 views

OS X security blocking brew installation of python

Running Darwin Home 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64 Trying to finish updating python... but failing to link it cause of ...
2
votes
1answer
79 views

Best way to create a user with a password without any user interaction? (asking user for password) (Ubuntu)

I'm creating a python script that will create user accounts with an username and a password from an excile file. I'm having trouble finding a one line command that will create an user with a password ...
0
votes
1answer
143 views

Unable to install PIP on Linux

I am trying to install pip on my Linux environment, but it is not installing properly. Python version - 2.6.6 When I try to install pip using the following command, python setup.py install ...
0
votes
0answers
67 views

Using Anaconda Python and Atom Platformio Ide Terminal

I'm trying to run some Python scripts in Atom using the platformio-ide-terminal, but it's not running the scripts as when I just open a terminal. I have Anaconda installed and that's how I'm running ...
0
votes
1answer
113 views

Default python command points to anaconda instead of /usr/bin/python

I've somehow messed up my python installation, while trying to update to Ubuntu 19.04 from 18.10. The python command points to my anaconda's python instead of /usr/bin/python. > which python /...
0
votes
1answer
120 views

Run Selenium Python script without headless mode on Linux Server

I have a script that I want to run on Linux server That script downloads CSV file from amazon after log in. I have achieved the goal with Chrome web driver (Chromium) using selenium in Python. My ...
0
votes
0answers
18 views

Occurred an error when trying too install packages for python

When I tying to install some package with pip for python in raspbian I occurred an erros as showes in picture http://uupload.ir/files/vasg_20190428_135436.jpg
0
votes
1answer
312 views

pip install opencv-python gives error on Raspbian

I'm using a Raspberry Pi 3 B+ with Raspbian installed. When I run pip install opencv-python I get the following message: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple ...
0
votes
1answer
18 views

How to create a process that runs a script until another process ends

I want to monitor the power that my system needs when i run a Benchmark. When the Benchmark ends the monitoring process should be killed . The monitor script is written in python. How do i do that?
0
votes
1answer
14 views

Permission Error with Fill Path Only

I have a script on a RHEL 7.x machine written in Python3. In testing this script I created a function which will append to a text file in the same directory. If I execute the script from the local ...
0
votes
2answers
44 views

Don't print the same string again if it was found between two files

I'm looking for the string SUCCESS into the file_1 & file_2 which in this case looks for the string and prints it based on whether its there on only file_1 or on both file_1 and file_2 while I'm ...
0
votes
1answer
58 views

sed/awk/python replace all spaces between characters after string match

I want to delete all spaces between characters after an initial match. An example is exmpl 0 t h i s a r e t he spaces to d e l e t e exmpl 1 m o r e spaces to d e l exmpl 2 o r s m t h completely d ...
0
votes
2answers
52 views

How to access external HDD from Ubuntu Shell

I'm running Python code on Jupyter notebooks in an Ubuntu shell (I have a Windows PC). I don't have any more space in the PC's internal drive, so I use an external hard drive, but I can't seem to find ...
-1
votes
3answers
75 views

Client to Client Communication

I need to connect to a Raspberry-pi from an Android, over a long distance (so via the internet). My aim is to switch a controller circuit from a remote location, by using internet and android app. ...
0
votes
0answers
19 views

use face_recognition in python

i installed face_recognition in ubuntu system with this command: pip install face_recognition and then i can useing it without any problem. like: $ face_recognition picture-folder/ mypic.png and then ...
0
votes
1answer
73 views

How to use the bash shell with Python's in place of /bin/sh

I have commands to execute in the terminal but I want to execute them directly from my python script except that my script it launches the commands on /bin /sh and my terminal on bash: just an ...
-1
votes
1answer
29 views

Sort based on second column and list from highest to lowest

TGAAACATGCCTTTCACCTCCTGCCATGATTGTGAGGCCT 2 GTGTTGCCCAGGTTGGTTTCAAACTCAGCTCAAGTGATCT 1 GAGACTCCTTCAGGAGACTGGTCCCCTGTCCTCGCCTCTC 3 CATGTTCTCCTGGAAGCCATGTGAGGAAGGCACATCATGG 8 ...
0
votes
0answers
25 views

python pip/pip3 defaults to --user behavior

I recently used pip install --user foo once and even though I did some other stuff, I can't imagine that any other command causes my pip install to use ~/.local/lib/python2.7/site-packages/ directory ...
0
votes
0answers
10 views

Can't open new URL in kiosk mode

So I'm working on a Spotify jukebox that displays album art (Raspberry Pi). I have a Python script that opens the url hosting the art in chromium, and updates it when the song changes, by opening a ...
1
vote
1answer
169 views

Python symbolic links mixed up

Using Ubuntu 16.04 Tried to set python 3.6 as default for the python3 command. I found what seemed to be the answer and quickly copy-pasted the following lines without carefully reading: $ sudo ...
0
votes
0answers
61 views

Couldn't load SIP module. Python support will be disabled

I installed QGIS version 3.6 on my pc with Lubuntu 18.10 64 bit. I have python 3.6.7 and QT 5.11.1. Once I run QGIS i get this error Couldn't load SIP module. Python support will be disabled. ...
-2
votes
1answer
262 views

Conan: Command Not Found

I'm using a RPI 3B uname -a returns: 4.14.98-v7+ #1200 armv71 OS is stretch gcc version is 4.9.3 I'm attempting to setup my RPi to be a BLE gateway as per this project on hackster.io. I executed ...
0
votes
1answer
49 views

X11 and pygame in Crontab

I have a script very similar to the one at the end of the pygame example page, and I want to run it on startup to make the whole thing listen for commands on startup. I ran "crontab -e" and as a first ...
0
votes
1answer
63 views

Anaconda Repository

I have a rhel server which I use as yum repository for my other servers. Now I need it to serve python packages as well. I found an anaconda repository to download packages: https://repo.continuum.io/...
1
vote
0answers
44 views

Parse log file continuously and send out a URL request to a predetermined IP address

We have a radius server which forwards the accounting messages to a Syslog server hosted on Linux server. we want to gather specific values from that log file and use those values as parameters in a ...
0
votes
1answer
97 views

Read paths on stdin and spawn a new interactive shell for each line

Consider a command that searches the entire home directory for a file or directory with the wrong permissions: $ find $HOME -perm 777 This is just an example; the command might be listing broken ...
1
vote
1answer
139 views

Problem with pip package installation in virtualenv environment

After creating python virtual environment virtualenv -p python3 venv and activating it source venv/bin/activate, i am trying to install python packages using pip command-> pip install Flask which ...
0
votes
0answers
58 views

Local Python Repository Packet Installation

I have a rhel server which I use as yum repository for my other servers. Now I need it to serve python packages as well. I found an anaconda repository to download packages: https://repo.continuum.io/...
0
votes
0answers
50 views

randomly generated words to a form using curl

What I want to achieve is to post a form containing 3 fields (forename, surname and email) to a url, but i want the entries to be randomly generated. I want to generate a random word using; { head /...
2
votes
1answer
47 views

Debian: installing a python package: apt-get or apt-src?

I tried to install a mutagen package, available according to apt-cache: $ apt-cache madison mutagen mutagen | 1.40.0-2 | http://deb.debian.org/debian buster/main Sources apt-get won't deliver: ...
1
vote
0answers
198 views

Log python http server output to file

I want to start a python webserver in the background and log all of its output to file. Instead the the servers output appears in the terminal. Even tho i guess this is pretty basic ... I've got no ...
1
vote
1answer
201 views

Are there binary packages available to upgrade python3 on Debian 9? [duplicate]

I need to upgrade Python on 30 laptops at several remote sites. These laptops have Debian 9 with Python 3.5, and the library they'll be using for the planned activity (arcade) requires Python 3.6. I ...
0
votes
1answer
2k views

pip not working after installing another python version

My CentOS 6.5 machine already had Python 2.6 installed in it. Now I just installed Python 2.7. But now, pip is not working. Whenever I run any pip command, it shows following error- File "/usr/bin/...
-1
votes
1answer
20 views

find in a file where sign of a column entry changes and print first line where this happens

I have multiply files, each with three columns. I would like to monitor where a given column entries first change sign (i.e negative to positive) so that I save that row where this first happens to ...
0
votes
1answer
44 views

How to install PySide as a non-root in Linux?

I want to compile a python programm (GetDistGUI.py) in Linux (CentOs) and whenever I type: chmod a+x GetDistGUI.py python GetDistGUI.py I get the following error, from PySide.QtCore import QRegExp ...
0
votes
0answers
11 views

uArm movement through python 3

import pyuf import time from time import sleep from pyfirmata import Arduino from uf.wrapper.swift_api import SwiftAPI swift=SwiftAPI() port = '/dev/ttyUSB0' board = Arduino(port) swift.set_position(x=...
0
votes
1answer
33 views

Unable to invoke Python from command line, SUSE Linux

When I type "python" into the terminal I get the following error: Traceback (most recent call last): File "/usr/lib64/python2.7/encodings/__init__.py", line 100, in search_function level=0) ...
0
votes
1answer
482 views

sslv3 alert handshake failure – error from feedparser in Python 2.7.6 – with workaround

I've been using a Python script (2.7.6 on Ubuntu 14.04LTS) to pick entries from RSS feeds using the "feedparser" module. This week it stopped working with a particular site. Digging, feedparser....
0
votes
1answer
41 views

EXT4 CRC32C checksum algorithms are badly documented

So I'm making some kind of research on EXT4 checksums. I found this page and tried to calculate checksum by myself. I've started with Superblock since it is sounds pretty simple: "The entire ...
1
vote
1answer
106 views

All Debian package managers broken due to Python bug [closed]

I am trying to fix my apt to make it useable. It only ables to update the package list. I cannot remove or install any package. The error I am getting is Could not find platform independent ...
0
votes
1answer
145 views

Multiple replacements using regular expressions in python

Can I use regex in python to have multiple types of substitutions? Like in this string "hello, this is me" I want to replace 'hello' with 'hi' and 'this' with 'its'. Can I do it in a single line? Or ...
0
votes
2answers
34 views

extracting string from files and merge (python)

I have a directory with multiple subfolders that all contain several text files which are formatted in the following way. data01:data02 I need to extract just the data02 after the : and export this ...
0
votes
0answers
155 views

hp-plugin install issue so I cannot scan

running Ubuntu 18.04 and printing well using my HP printer I have an issue with the scan. I can connect to my scanner (using Simple Scan or xsane), however, that's all. Error shows up saying I have ...
1
vote
2answers
115 views

Is it safe to add new python version to PATH?

Is there any danger to adding a new version of python to PATH? i.e. will some important system programs break? Suppose this is without deleting the old python2, but effectively changing the command "...
4
votes
1answer
261 views

is 'sed' thread safe

If I have a shell/python script that uses sed to modify a file in place based on user inputs, and then two users run the same script at the same time or approx. same time, is 'sed' thread safe ? Or ...
0
votes
1answer
1k views

pip install error: “SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed”

I am getting the following error when I try to do anything in pip. I have tired to upgrade pip as stated below and nothing. Any ideas? Collecting pip Exception: Traceback (most recent call last): ...
0
votes
1answer
102 views

sudo: move: command not found [closed]

I wanted to automate installation of pycharm on my new Linux Mint 19.1 and everything works great until I use sudo move command. Whenever code goes to that line I get "sudo: move: command not found" ...