Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at [Stack Overflow](http://www.stackoverflow.com).

0
votes
0answers
9 views

How to find occurrence of a small video clip inside another video and the time frames when the small video clip occured

I have a recording of a channel video and an advertise clip video. i want to find no of time the advertise played in the channel.
0
votes
1answer
10 views

How to run Python script in VS Code with an extension Code Runner?

I installed Code Runner extension in VS Code. In my settings.json I have set "python.pythonPath": "python" option and python is in my Win10 PATH variable. In code-runner.executorMap option in ...
0
votes
1answer
26 views

win - python 2.7 & 3.6 - switching version that script uses from shell

I have placed a script test.py in my %USERPROFILE% folder: import sys print("TEST", sys.version_info, sys.executable) When running cmd (WIN+R) and then typing test+ENTER the following is returned: ...
0
votes
0answers
13 views

Virtualenvs will not work on Mac OS X

I am running macOS High Sierra 10.13.6. I haven't used Python for about 3 months, but coming back to it it seems that Python is completely broken. For example, I am trying to create a new virtual ...
0
votes
2answers
50 views

Python program fails only if run (via ssh) from a mac terminal

I am trying to run a python program on a data processing (linux) cluster. The program runs fine if I ssh to the cluster from my linux desktop and start it but fails if I ssh to the cluster from my mac ...
-2
votes
0answers
14 views

Python program to search through subdirectories and delete files older than 2 hours [on hold]

import os, time, sys import datetime import stat now1 = time.time() a=[] twohoursago= now1 - 60*60*60*2 print (twohoursago) def getListOfFiles(dirName): # create a list of file and sub directories ...
0
votes
0answers
8 views

Ubuntu 16.04, uninstalled python, now vim is broken and I can't fix it

I was having some problems with conflicts between my Anaconda python installation and my system Python on Ubuntu 16.04, so I decided to remove the system python packages. Apparently that was a bad ...
0
votes
0answers
5 views

invalid location passed in, must give absolute path?

I am trying to run a python sandbox example for Redhawk (https://redhawksdr.github.io/Documentation/mainch3.html#x5-270003.3). I could start REDHAWK IDE from /usr/local/redhawk/ide/2.1.2 folder (./...
-1
votes
0answers
32 views

Pattern Learning with Python [closed]

I am parsing bank transactions in Python and assigning categories to each transaction based on the transaction description string. I would like to have some Python code that runs "analysis" on ...
0
votes
0answers
33 views

editing what .sh files do on install

I'm trying to install Anaconda on my laptop running the latest version of elementary os. I followed the steps on the official site. http://docs.anaconda.com/anaconda/install/linux/ However when I ...
1
vote
1answer
27 views

Local python libraries management

On my Ubuntu system, I have a lot of python libraries manually installed in /usr/local/lib by pip a long time ago, some of which are now outdated by the ones from the official ubuntu packages in /usr/...
0
votes
0answers
18 views

How to ensure that a malware has been removed completely from MacOS? [duplicate]

Recently, I downloaded the Photoshop Downloader and the installer seemed very suspicious. I was completely out of my mind as I proceeded with the installation and a popup asked me for permission to ...
0
votes
0answers
9 views

Python UniCurses PDCurses not valid

I installed UniCurses on Python a few months ago with great difficulty. But recently after installing UniCurses when I import it says %1 not a valid win32. But it was working a few months ago.
1
vote
0answers
21 views

How do I hide empyy lines in a Python file in Vim?

I have some empty lines showing as dark purple lines in my color theme in vim(Gvim). I would like to hide them for real. I use "set list" but that just replaces with some other characters. I just ...
0
votes
1answer
28 views

bs4 python module issue

When I run the command: python checker.py capture.xml indication NULL I get the error: Traceback (most recent call last): File "checker.py", line 1, in ModuleNotFoundError: No module named ...
0
votes
1answer
47 views

Add python 3.7.1 path on windows 7

I want to use python from my cmd/bash, I have copied the path and added it the environment variables but it didn't work, python is working fine from python GUI. I have checked youtube videos there ...
0
votes
1answer
70 views

How to allocate more memory to Python? macOS

I’m generating a brute force dictionary in Python on my Mac for a CTF tournament. I was wondering if there’s a way to dedicate more RAM to that process. What I’m aiming for is to make this go faster ...
2
votes
2answers
139 views

Run a program and log to both screen and file in real time

I've written a very simple python program (in reality my program is a lot more complex): from time import sleep for i in range(10): print(i) sleep(1) to print the digits 0-9, 1 each second ...
0
votes
0answers
29 views

Django Application Killed unexpectedly in AWS EC2 Instance

I have a Django Project running over AWS EC2 Instance. I am using default Django server to run the application. To make the server running in background I have used screen command as: To open screen: ...
0
votes
0answers
11 views

Python-dev, installing with no internet

I need to install python-dev on a machine with no internet access (note: the machine has python2.7 and pip installed). I need python-dev, as my code that needs to run on this machine depends on ...
0
votes
1answer
31 views

It is possible to upgrade a Python installation?

I installed Python 3.6 (on Windows, but the question is also relevant to Linux) and would like to upgrade this installation to 3.7. I know I can install another version in parallel and that they will ...
0
votes
1answer
49 views

How to terminate a python process similar to ctrl-c?

If I have several Terminal windows open, each running a python script, is there a way to terminate one by PID as if I pressed ctrl-c? With ctrl-c the script exits gracefully, but I tried various kill ...
0
votes
0answers
29 views

running f2py in terminal results in permission denied

Hi I have python and bumpy installed on my OS X using home-brew. But when I try to run zsh: command not found: f2py trying to link using home-brew gives me the error Linking /usr/local/Cellar/...
0
votes
1answer
73 views

How do I edit a line created by an installer

So I've been trying to install Anaconda on elementary os. I used the steps found on this website http://docs.anaconda.com/anaconda/install/linux/. And got the following error. bash: /home/anton/....
0
votes
0answers
27 views

Python can't find/run file in C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup

I'm trying to run a python script when the system boots on a Windows 10 workstation. My python script runs fine when I kick it off in a different directory but I noticed that when I run it from the C:\...
0
votes
0answers
5 views

Save an animation on Python [migrated]

I am trying to save a simple animation maid by a Python code using the following commands: anim = animation.FuncAnimation(fig, animate, init_func=init, frames =...
0
votes
0answers
17 views

yum update failed “StopIteration” hdr = idx.next()

Just trying a routine yum update And first got this: ... Cleanup : ncurses-base-5.7-3.20090208.el6.x86_64 ...
0
votes
0answers
13 views

pipenv module install fails with lmod modules enabled

Recently I've been experimenting with cluster computing/administration. I've got a small RasPi cluster with shared storage. On the NFS storage, Python 3.6 is installed to a folder. I'm using LMOD to ...
0
votes
1answer
92 views

The script is installed in directory, which is not PATH

During the installation process of Jupiter Notebook using pip, it said that scripts were installed in a folder that is not on PATH. Can it cause any problems? How can I fix it? Here is full log: ...
0
votes
0answers
17 views

(can't connect to mysql server on ''localhost:3306' (-5 no address assoicated with hostname)

I am using pie 3 b+ and installed mysql. I have no problem getting sql from the command line and creating databases and getting data back from it. I am new to python, mysql and lunix in general. I ...
0
votes
1answer
6 views

Show context after every move using Python pdb

Can I show the context any time I step through code using Python's pdb debugger without having to explicitly call the list command? I've tried chaining commands with something like n & l or n &...
1
vote
0answers
23 views

Why does my python background process shut down on his own (Mac OS) [closed]

I have a simple slackbot which is running with a python script. I wrote a .sh file to make it run in the background without having to keep the terminal open according to what I read here and there. ...
0
votes
1answer
49 views

Prevent Python from quitting on ctrl-D

I find the following often happens to me: I am using Python in an interactive terminal session I accidentally type something with unbalanced parentheses Python gives me a ... prompt, expecting me to ...
1
vote
1answer
54 views

Will deleting my “/usr/local/” in macOS folder be a good start for a clean Python reinstall?

I am using macOS and have had trouble trying to install a Python package recently (SpiceyPy), I was lost in all the stuff that I had installed since I started using python. I did not really ...
0
votes
1answer
111 views

Jupyter Notebook ModuleNotFoundError --> No module named 'sql' when running Python

I use Jupyter Notebook from Anaconda 3 to run Python but unable to run certain Python code. Below is the first cell of the Python code and the first 2 rows of the error: enter image description here ...
0
votes
0answers
57 views

Problem installing autokeras and elephas using Anaconda and pip

I am trying to install autokeras and elephas using Anaconda and pip, so that it can be used in a Jupyter notebook. However, using simply pip install autokeras or pip install elephas do not seem ...
0
votes
0answers
43 views

scrot producing only black images

I'm using pyautogui to monitor and replay user inputs and also to take screenshot of parts of the screen. On Linux pyautogui relies on scrot for the screen capture part. The problem is, scrot is ...
0
votes
1answer
36 views

Finding Python dylib

This is a question that has to do with the way python is linked to a module in Mac OSX. I think someone in this community may be able to help. I am working on Mac OSX High Sierra. I am trying to ...
0
votes
0answers
40 views

python 2.7 WMI script speed up

I am a beginner in Python. I want to check who was the last user logged on a Windows PC in domain. My Script works fine but it's very slow. The script needs about 12 hours because there are many pcs ...
0
votes
1answer
33 views

Is this ok to install python on d drive?

I am using window 10 and want to install python on d drive because after reinstalling Windows, I don't want to reinstall python again and don't want to take backup of python before reinstalling ...
0
votes
0answers
7 views

Monit process permission issues

I have a celery consumer which is written in python and it executes a Perl script for every task in the queue. I have added the celery to init.d configuration, everything works as expected but when ...
0
votes
0answers
17 views

conda auto try `conda-forge` if `install fail`

Some packages are not provided in conda default channel. Usually I have to conda install pyarrow found nothing. Then tried conda install -c conda-forge pyarrow successful. How can I make it auto ...
0
votes
0answers
17 views

Add a static site in to django system

Is that possible to add external html site to django system? while requiring user to log-in lets say, I have to include a user manual in to my system and it is a set of (html, css, js) files. the ...
0
votes
0answers
234 views

Setting up pyenv virtualenv in Mojave

I'm trying to setup a clean python environment in Mojave 10.14 following this guideline. It most closely matches what I would like to have: both python 2.7.15 and 3.7.0 usable, and a single jupyter ...
0
votes
1answer
36 views

Win10 python called from 'cmd' different than 'run' (2 versions installed)

I installed python 2.7 then needed to switch to python 3.5. I changed all my environment variables (system & user) to remove 2.7 from PATH (I don't want to remove python 2.7, just keep it in ...
0
votes
0answers
37 views

Error installing Pysam in Cygwin

I'm new to Cygwin and Python. I'm trying to install Pysam, but am getting the following errors at the end: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-...
0
votes
0answers
21 views

What's the relationship Outlook email format (.msg)" to Office 365 and IMAP?

I'm writing a Python CLI script with IMAPClient to parse MS Office 365 email messages. Right now I'm learning about MIME emails and looking for solutions to parse multipart messages to get to HTML ...
0
votes
0answers
64 views

ffmpeg not generating bandwidth into my mpd file (dash)

We are developing a built-in player which streams via DASH protocol. One stop is to first convert all media sent by the user to MP4 (h264), the problem is, when ffmpeg generates the manifesto for the ...
0
votes
0answers
87 views

No such file or directory: mod_wsgi

My Apache seems to be running okay, except for two things. 1) Message in error.log: [wsgi:warn] [pid 1234:tid 12345678] (2)No such file or directory: mod_wsgi (pid=1234): Unable to stat Python ...
1
vote
1answer
84 views

Pass local environment variables to Python script on Windows server using SSH

I am trying to execute a Python script on Windows server 2016. I have Win32-OpenSSH installed on Windows server. The python script expects two environment variables (BITBUCKET_REPO_SLUG and ...