Questions tagged [python3]

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) instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

"Edit with IDLE" is not working for .py files inside importlib package. during debugging, I cant go to source line, only for importlib package

This is the default python package named 'importlib', I am trying to access and open/edit .py files inside this package.
user avatar
0 votes
0 answers
15 views

Does Gnome Startup Applications or PyEnv or Python or Ubuntu keep a cached version of programs? If so, where is it stored?

I've written a Python program and added it to Ubuntu's (16.04) Gnome Startup applications, where it is invoked via the command: python /path/to/iRest/main.py >> iRestErrors.log. It used to work ...
user avatar
  • 1,005
0 votes
0 answers
19 views

On a Debian based distro, wanting to use kmsdrm driver for SDL2 with Pygame 2.x.x but not working

I was using /dev/fb0 with python3-pygame package but I decided to look at Pygame 2.x.x. So Pygame 2.x.x uses SDL2 which removes /dev/fb0 support. I wanted to see if I could potentially create a simple ...
user avatar
  • 1
0 votes
0 answers
22 views

FFMPEG Crop and Trim resulting in a video with stall frames in few seconds

In my video frames, two people talk side by side. I want to first get a small clip of the video and then crop them as person 1 and teacher 1. I used below code snipped to generate these small clips. ...
user avatar
1 vote
1 answer
69 views

How to remove/uninstall corrupted winget package?

When I run winget list python I get that Python.Python.3 is installed by winget; however, running python says the executable is missing. winget uninstall --id Python.Python.3 runs the uninstaller but ...
user avatar
0 votes
1 answer
189 views

Pip isn't working because some random process is running

So basically... I installed the python-certifi-win32 to solve another problem I was having, but then it was giving me a separate error. So I tried to uninstall it with pip, but I got this error: ...
user avatar
0 votes
0 answers
25 views

How do I multiply a specific row of values by a list of weightages in pandas?

I have a pandas dataframe with columns of stock with mean and std as indexes # initialize data of lists. data = {'st1':[0.016981, 0.053512], 'st2':[0.021479, 0.067820], 'st3':[0.057370,...
user avatar
  • 3
-1 votes
4 answers
101 views

How to delete all files (or the entire content of all files) with less than 250 words with Regex?

Is it possible to delete all files (or the entire content of all files) with less than 250 words? I try this regex, but needs to be improved a little bit. Can anyone help me? Find: (?s)(.*?(\w+\s?){1,...
user avatar
0 votes
0 answers
12 views

How to do changes in autorunning script after your Raspberry Pi has booted?

The configuration file is which handle the initial settings of our pi project. So when we set the the pi project in the autorun mode which starts up when the pi is booted. Is there any ways to do ...
user avatar
2 votes
0 answers
761 views

Cannot install packages with pip - error with inconsistent version but version matches metadata

I recently have an issue trying to install anything with pip. It keeps trying older versions complaining that each one has a version mismatch, when it matches perfectly fine. This following log is ...
user avatar
0 votes
0 answers
23 views

FFMPEG compress a I-frames into a P-frame, given a I-frame before

I have two consecutive I-frames (uncompressed jpg or numpy image) and i want to compress the second one into a P-frame and than later do the reverse. Is this possible with FFMPEG?
user avatar
0 votes
0 answers
303 views

Python update broke `apt-listchanges`, completely breaking apt & dpkg

OS: Debian 11 OG Python vertion: 3.9 I updated python to 3.10 and did update-alternatives, after which on running pip i got the error: E: Sub-process /usr/bin/apt-listchanges --apt || test $? -ne 10 ...
user avatar
0 votes
0 answers
95 views

My saved .py files can be seen in Pycharm but not in File Explorer

I already saved one file before. But when I do it now, it doesn't show in file explorer but shows in Pycharm "open" section. Any explanation and a way to fix this would be appreciated.
user avatar
0 votes
1 answer
26 views

How to install Python 3 in RHEL in such a way that it won't mess up the current Python 2 installation?

I have an EC2 instance which is running Python 2.x. I want to install python 3.x but I do not know if Python 2 is currently being used by anything. My questions are: How do I install Python 3 in such ...
user avatar
  • 11
0 votes
1 answer
535 views

Is it possible to recover a tab in Spyder

I am new on python, and by mistake I deleted my tab that I was working on. There is a way to recover all the code I wrote? I am using Spyder as the IDE.
user avatar
  • 1
0 votes
0 answers
69 views

Run Python with admin on a non admin user on startup

I'm working on creating a script that runs on a certain user while they log in. I have full admin access, however, this user does not. When this user logs in, I want my Python script to run as admin. ...
user avatar
  • 1
0 votes
0 answers
213 views

Pip3 cannot install sqlite3 nor update

I am not very familiar with suse where I am trying to do this, nor much of an expert on python. I am trying to some some python3 script I have written on this box. I am using computed columns which is ...
user avatar
0 votes
1 answer
174 views

Python .ipynb too large to open. Both Thonny, Jupyter Notebook shut down when trying

I am using Python 3.73 in Jupyter Notebook 4.4.0 The only This page isn't responding: Wait Ultimately, Jupyter shuts down I understand the issue is that Firefox is using too much memory. The file I ...
user avatar
  • 113
0 votes
1 answer
37 views

Python no longer detected as a language in VS Code

I'm genuinely confused and have no idea how this happened. If I try to set the language to Python in a file, the option doesn't appear Python files have the plain text icon and there is no syntax ...
user avatar
  • 385
0 votes
1 answer
181 views

How do I installing Python 3.9.6 on Windows 10 Pro (when there is another version installed) - installer fails?

This is extremely frustrating, ideally I would like to get in touch with the Python installer team to fix the installer. I am attempting to install Python 3.9.6 on my system. I previously installed ...
user avatar
0 votes
0 answers
924 views

RuntimeError: can't start new thread

I'm running into an issue where running multiple instances of the same Python program on my server is causing some of the jobs to throw the following error: File "/home/joe/workspace/...
user avatar
1 vote
1 answer
655 views

pip3 encountering permission errors when run outside of a virtualenv

I was in the process of installing CrackMapExec (CME) on Ubuntu this afternoon, and the CME docs suggested that I install pipx and manage the installation of CME through pipx to avoid dependency ...
user avatar
0 votes
0 answers
81 views

Python 3.10 IDLE does not respond everytime I hit configure IDLE from options

I had configured the IDLE to dark mode and had added the Fira Code font to the IDLE a few days back (Through the Options menu). Then the Python IDLE was working fine; without issues. However, each ...
user avatar
0 votes
0 answers
31 views

How to impelement a script for automatic router internet switch if one router network down

My requirement show in above image. I want python or shell script for automatic router internet switch if one router internet down. My concept is based on router redundancy. I am using Ubuntu 14.04 OS ...
user avatar
-1 votes
1 answer
216 views

Task Scheduler does not launch chrome when Run whether user is logged on or not is selected

I have Python script for web-scraping. I am running it using papermill and then I created a batch file that I use on task scheduler to run. This workflow was running fine until my virtual machine got ...
user avatar
  • 49
0 votes
2 answers
1k views

Sub-process /usr/bin/dpkg returned an error code (1). AGAIN

I realize this seems to be a very popular question but none of the fixes worked for me. I use ubuntu 18.04 and I've been unable to apt install anything for the good part of 6 months. It says the issue ...
user avatar
  • 101
0 votes
0 answers
17 views

Failed to execute script with --noconsole option

I made a program that connect to the server and receives commands and executes it but I have noticed that if I convert the py to exe using pyinstaller with --noconsole option it gives me a error "...
user avatar
0 votes
1 answer
808 views

Issue opening and running Python in PowerShell

I am new to python programming (already know C) and am following Zed Shaw's book Learn Python the Hard Way. For that, I need to use Python on PowerShell. When I type python in CMD, Python opens up ...
user avatar
0 votes
0 answers
25 views

Multiple cursors at once functionality, just as in the Visual Studio Code but in every Windows application?

Was wondering if this: https://code.visualstudio.com/docs/editor/codebasics can be implemented with WinApi or by DLL calls using something such as https://www.autohotkey.com/docs/commands/DllCall.htm ...
user avatar
0 votes
1 answer
544 views

How to install python2 packages using pip while having python3?

I am on Parrot OS. I have both python 2 and Python 3 installed. ┌─[✗]─[jaysmito@parrot]─[~/] └──╼ $python --version Python 3.9.2 ┌─[jaysmito@parrot]─[~/] └──╼ $python2 --version Python 2.7.18 And pip:...
user avatar
1 vote
1 answer
684 views

Pip3 not working at all

So a couple days ago, I had a problem where pip3 just stopped working. I was planning on upgrading my WSL2 anyway, so I just migrated to Ubuntu 20. But the same problem has occurred here too! I can't ...
user avatar
  • 141
0 votes
1 answer
2k views

Upgrade python from 3.8.5 to 3.8.8 on Ubuntu 20.04 LTS

I'm currently trying to upgrade the python version from 3.8.5 to 3.8.8 on Ubuntu 20.04 LTS. I've been able to find information to upgrade python version from version X.Y1 to X.Y2 (minor release in ...
user avatar
  • 3
2 votes
1 answer
3k views

Ansible installed via pip3, but Ansible commands not found

I have installed Ansible via pip3, but I can't find the Ansible commands (ansible --version, ansible-playbook, etc.) Here's the listing that shows that Ansible is installed via pip3: :~# pip3 list | ...
user avatar
0 votes
0 answers
35 views

How do I properly stream media from a local http server running on my laptop to other devices on my WiFi network?

So I am running a simple http server on a certain directory on my laptop (say Music/), with python -m http.server - the command starts up a server on my machine with port 8000. I proceed to look up my ...
user avatar
1 vote
0 answers
24 views

How to change the target directory of target-csv when running tap-target script inside python? [closed]

I am trying to a script run.sh using python subprocess The script creates a csv file and a state.json file in the cwd This is the script(works fine when i run it from terminal) : #!/bin/bash export ...
user avatar
3 votes
0 answers
2k views

Can't install with pip: SSL error

I'm new to coding and have recently started learning Python. Whenever I enter pip install django (for example), I get these error messages: WARNING: Retrying (Retry(total=0, connect=None, read=None, ...
user avatar
2 votes
1 answer
217 views

Autokey error, not apparently related to my script

I have written a small Autokey script to start Firefox full-screen with a certain URL. The script has worked well for a couple of years. Since a system upgrade, it has started producing a Python error ...
user avatar
0 votes
1 answer
115 views

Broken raspberry pi 4 case python3 script causes disk errors

I am using kali linux on raspberry pi 4 and argon one case I installed argon one fan and power button script with that command: sudo curl https://raw.githubusercontent.com/meuter/argon-one-case-ubuntu-...
user avatar
  • 3
0 votes
0 answers
24 views

Anaconda 1.10 installation how to create new environments with Python 3.7 rather than 3.8?

I installed Anaconda 1.10 (Win 10 Home, 64-bit, 20H2; with installer Anaconda3-2020.11-Windows-x86_64) When I tried to create a new environment, only Python 3.8 was offered. How do I create a new ...
user avatar
1 vote
0 answers
400 views

On Mac Big Sur, what's the correct way to build Python 3.9 with SSL support?

I'm using Mac Big Sur. I want to build Python with SSL support from the binary, whcih I downloaded from here -- https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz. Following the instructions ...
user avatar
  • 62
2 votes
1 answer
269 views

couldn't upgrade to fedora due to error "nothing provides python3.8dist(python-magic)"

I'm using fedora 32. I did sudo dnf update -y I got below error - $ sudo dnf update -y Last metadata expiration check: 1:24:24 ago on Mon 30 Nov 2020 04:42:35 PM EST. Dependencies resolved....
user avatar
0 votes
1 answer
1k views

python3 is not recognized as an internal or external command.operable program or batch file

i have python 3.8.6 installed in my Windows 7 x64 .Whenever i try to run python3 as a command.it gives me an message stating that python3 is not recognized as an internal or external command.operable ...
user avatar
  • 1
0 votes
1 answer
4k views

sslstrip ImportError: No module named twisted.web

I can't get sslstrip to work... When I run sslstrip I get this: Traceback (most recent call last): File "/usr/local/bin/sslstrip", line 27, in <module> from twisted.web import ...
user avatar
0 votes
1 answer
149 views

Pycharm puts red lines on valid annotations in python3.7

When adding type hints to my python3.7 code. I often don't import the actual classes to avoid circular dependencies. Instead I use from __future__ import annotations to let them be converted to ...
user avatar
0 votes
1 answer
3k views

pipenv fails on Ubuntu 20.04

I was trying to use pipenv on Ubuntu 20.04 and got a perplexing error message. First, you must install pipenv. Install pipenv locally, not system wide, or you get into a whole different can of worms! ...
user avatar
0 votes
0 answers
54 views

TEXT EDITING for data processing

I have a question about text editing I have a big text file that contain input list in it as you see the example of that file on the picture. the list look like this: Input form jalan ba-jalan pem-...
user avatar
  • 1
1 vote
1 answer
3k views

Error using pip with requirements.txt

I have never used requirements.txt before, and just came across it following a tutorial. My file looks like this: pip install kivy pip install kivy-deps.angle pip install kivy-deps.glew pip install ...
user avatar
  • 2,422
1 vote
0 answers
633 views

When trying to install Python3 on an Intel Chromebook - getting error "Sudo: user does not exist in passwd database"

I'm trying to run Python 3 on Linux. My Device is Chromebook with Intel processor. I've tried downloading python by 2 different methods. I'm new to coding and trying to learn. I would appreciate any ...
user avatar
7 votes
5 answers
21k views

How do I alias python3 on Windows?

I want to alias python3 to python on windows. I have already removed the alias for the microsoft store as described in this answer. However python3 is still not a known alias. How to I fix this?
user avatar
-2 votes
1 answer
151 views

Cannot retrieve a value from a web page using Selenium in Python3 [closed]

iam just trying to login to a webpage using selenium to post credentials to it and the use XPath to get the the profit value. My code is: #!/usr/bin/python3 # coding=utf-8 from selenium import ...
user avatar
  • 97

1
2 3 4 5
7